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

Re: seamless processing of multiple XML fragments

Subject: Re: seamless processing of multiple XML fragments
From: "Aleksei Valikov" <valikov@xxxxxx>
Date: Mon, 3 Sep 2001 20:50:44 +0200
untite corporation
Hi.

> The tag <include file="File2.xml"/> conceptually shows where the xml
> fragment in the second file should be inserted into xml fragment in
> the first file. I could accept any mechanism that allows this type
> of insertion. Here is my questions to the list: Is there a way to
> implement this so that the XSLT processing is seamless? I don;t
> want to concern myself with tracing nested includes in writing the
> XSLT. Your help is appreciated.

In 1.0 best solustion is transforming in two steps - first process includes,
then process generated utited file.
Otherwise you could not get your document conceptually united - you will
still have to operate on two documents.

You may be content with something like

<xsl:template match="include">
  <xsl:for-each select="document(string(@file))">
     <xsl:apply-templates/>
  </xsl:for-each>
</xsl:template>

This will process templates on you files as if they were united, but
location path will still return include elements where they are.

You may also think of entity solution. declare yur doc as an entity and use
&mydoc; instead your include. This will untite documents and represent them
as single tree.

With later versions, you may first create a united tree in a variable and
then process that tree. It is also possible with 1.0 but with the help of
nodesetfuction extension.

Bye.
/lexi


 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.