[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

Subject: RE: How to select a document element from the input xml file using xslt?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 13 Jul 2004 10:00:27 +0100
saxon document element
> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.