[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: seamless processing of multiple XML fragments
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
|
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
|