[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Wrapper for XSL for offline development

Subject: Re: Wrapper for XSL for offline development
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 7 Nov 2000 18:53:16 +0000
Re: Wrapper for XSL for offline development
Alan,

> but how to take the root nodes from several of these document( )
> calls and put them under the root node of my original XML document?

I'd take it in two steps.  The first is the pre-processing, that
parses the PIs and copies your source XML, but with the PIs
substituted for the contents of the relevant documents.  For example:

<xsl:template match="*">
  <xsl:copy>
    <xsl:copy-of select="@*" />
    <xsl:apply-templates />
  </xsl:copy>
</xsl:template>

<xsl:template match="processing-instruction('fub-process')">
  <!-- identify the file from the content of the PI -->
  <xsl:variable name="file"
                select="substring-after(substring-after(., ':'), ':')"
                />
  <!-- copy the content of the file (the document element)
       into the output -->
  <xsl:copy-of select="document(concat($file, '.xml'))/*" />
</xsl:template>

The second step involves applying your production stylesheet to the
result of applying the pre-processing stylesheet.

> And then apply the XSL file that would normally be applied in the
> online environment?

There may be a processor-specific way of chaining stylesheets together
within Xalan, but I'm afraid I'm not familiar enough with it to be
able to tell you.  You could create a batch file that ran the two
transformations one after the other.  Alternatively, if you don't mind
using the node-set extension function, you could effectively chain the
two transformations together with that.

Let us know if you need any more guidance or a description of one of the
options above.

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.