Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XML and keeping things seperated? >Thread Next - Re: XML and keeping things seperated? Re: XML and keeping things seperated?To: NULL Date: 6/3/2006 7:01:00 PM dingbat@c... wrote: > 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, like: >> >> <?xml version="1.0" encoding="ISO-8859-1"?> >> <?xml-stylesheet type="text/xsl" href="test.xsl"?> > > Yes. > >> 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.) > > Sort of, but not really how you're thinking. > > XML "doesn't do" includes. There are various techniques applicable, > but they're either not workable, not implemented, or just not commonly > used. It's also relatively rare to use the <?xml-stylesheet ... ?> PI. > Most XSLT gets transformed on servers (for widespread output device > compatibility) rather than getting shipped out as XML with a linked > stylesheet and transformed on the final device. I wasn't really aware of that, thanks. > So the linkage of content and presentation stylesheet is (in general) > done by external non-XSLT scripts calling XSLT engines from outside. Are there any common engines, for XSLT, as well as XML checking and parsing, that are common on linux/UNIX and even win32 ? I think this part is what really hasn't been clear to me. I am a seasoned programmer, but xml is something I've very recently started exploring, so I guess I'm just seeking advise from those in the know, and so far it's helped a lot :-) > If you want to describe this linkage in an XML format then of course > you can do so, but most ways of doing it are project-specific and > don't use a clearly defined or standardisaed format. You can of > course use the PI attached to the document and read this from your > script, then use that to indicate the XSLT transform to use. Well if I knew about the engines that can handle the transofrmations externally, I probably wouldn't of even asked my question, but again, I'm just exploring something new. > You might also find a look at the XInclude protocol and the Cocoon > project to be useful. Perhaps, thouhg other posts seem to indicate that is something not widely supported yet, but may I assume that is something that will be added to most major parsers, that do not support it, in the near future? -- Stan | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
