|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How to select a document element from the input xm
> I had this same problem just today and solved it exactly the way you
> described. You mention that more control over this will be
> possible in
> XLST 2.0. I'm currently using Saxon 8.0. Was there a more elegant
> method I could have used to solve this problem?
>
XSLT 2.0 (and Saxon 8.0) currently allow you to have named xsl:output
declarations, so you can do:
<xsl:output name="p1" doctype-system="pppp1"/>
<xsl:output name="p2" doctype-system="pppp2"/>
<xsl:template match="/">
<xsl:choose>
<xsl:when test="...">
<xsl:result-document format="p1">
...
</
</
<xsl:otherwise>
<xsl:result-document format="p2">
...
</
</
</
</
In the next draft, as a result of public comments, you will be allowed to
select serialization attributes individually using AVTs in the
xsl:result-document instruction, i.e.
<xsl:result-document doctype-system="{$p1}">
Michael Kay
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








