<warning type="soapbox"> Well, it depends on where your data comes from, how much you have, etc. If you are using a GUI XML editor or a content editing system that exports XML, you may be restricted to the dialect of XML the GUI produces. It may include a DTD for the XML for it's own internal validation checks. In that instance, since the document already conforms to the DTD there's no harm in using that to associate documents with a stylesheet.
In other instances you may have a large amount of data, and you don't want to change hundreds or thousands of XML files every time the name of a stylesheet changes. In either case (and many others) it may be simpler to create these document -> stylesheet associations in your httpd.conf (or .htaccess file) and just let the XML content creators worry about content, and the display creators can worry about the content display. </warning> On Tuesday 27 May 2003 04:36 pm, S Woodside wrote: > Really? When would you suggest using this feature? > > Simon > > On Tuesday, May 27, 2003, at 06:37 PM, Michael A Nachbaur wrote: > > Well, if your document has a DTD reference in it, you can use that to > > associate your XML documents with the appropriate stylesheet by using > > the > > AxAdd*Processor directives. Look at the AxKit manual page for more > > information. Suffice to say, using your sample configuration, you > > could do: > > > > PerlModule AxKit > > AddHandler axkit .xml > > AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT > > AxAddDTDProcessor text/xsl /guide.xsl /guide.dtd > > > > This tells AxKit to use the "guide.xsl" stylesheet (with the text/xsl > > stylesheet processor) whenever the DTD "/guide.dtd" is used in an XML > > file. > > > > Hope this helps. > > > > On Tuesday 27 May 2003 02:19 pm, Mauro Sciaccaluga wrote: > >> Hello everybody, > >> > >> I am a new user to axkit. I like it!! It works great!!! I need just > >> your > >> assistance for a thing i cannot handle very well. > >> > >> Please let me tell you what it happens. > >> > >> I have some .xml file that I want to parse automatically by apache > >> (thanks > >> to axkit naturally).... I succeeded to do this. but I have had to > >> change > >> (to add) a thing in these files to get them work: > >> > >> <?xml-stylesheet href="guide.xsl" type="text/xsl"?> > >> > >> Before there was just: > >> > >> <!DOCTYPE guide SYSTEM "guide.dtd"> > >> > >> I have both these files: guide.dtd and guide.xsl > >> > >> If I put the stylesheet tag axkit parse this file correctly. How can > >> I tell > >> axkit to use by default the guide.xsl for my xml with just the > >> !DOCTYPE > >> tag?? > >> > >> These are my apache.conf (httpd.conf): > >> > >> .. > >> .. > >> .. > >> PerlModule AxKit > >> AddHandler axkit .xml > >> #AddHandler axkit .xsp > >> #AddHandler axkit .dkb > >> AxDebugLevel 10 > >> PerlSetVar AxXPSInterpolate 1 > >> AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT > >> > >> ------------------ > >> > >> Definitely... I don't know much about .dtd files.. please someone > >> helps > >> me!! > >> > >> :-) thanks a lot!! > >> > >> buh bye > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > > Michael A Nachbaur <[EMAIL PROTECTED]> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > -- > anti-spam: do not post this address publicly > www.simonwoodside.com -- 99% Devil, 1% Angel > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Michael A Nachbaur <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]