Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML and keeping things seperated?

From: "Andy Dingley <dingbat@----------.--->" <dingbat@----------.--->
To: NULL
Date: 6/1/2006 4:27:00 AM


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.

So the linkage of content and presentation stylesheet is (in general)
done by external non-XSLT scripts calling XSLT engines from outside. 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.

You might also find a look at the XInclude protocol and the Cocoon
project to be useful.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent