Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: I've read up on XML, but how to really use it?? [Thread Next] Re: I've read up on XML, but how to really use it??To: NULL Date: 5/31/2006 5:20:00 PM Stan R. wrote: > One more question if I may. From what I've gathered, usually you include > the XSLT template right into your main xml doc you're working with, a > la: > > <?xml version="1.0" encoding="ISO-8859-1"?> > <?xml-stylesheet type="text/xsl" href="test.xsl"?> Not "include into", but "reference from". > My question is, is it possible to have the main xml doc in one file > (say, main.xml), but have a seperate xml file for the transformations > (include both a XSLT and the main.xml document.) That's exactly what the above achieves; the transformations are stored in test.xslt, references from your main XML document. If you mean "can I run different stylesheets at different times against the same XML" -- Yes, but then you have to use a system that lets you specify that pairing, rather than letting the XML file state which stylesheet it expects you'd want to run against it. That's easy to do when you're explicitly invoking an XSLT processor, less easy (because less standardized) when you're trying to use a browser. > From everything I've found online thus far, it seem including xml files > in other xml files isn't a very clear topic XInclude is clear, but not widely supported yet.... and not always the right answer. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
