[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Combining XML with XLink to produce HTML
Hi > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Christos Tsoukalas > Sent: Thursday, July 17, 2003 3:14 PM > To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx' > Subject: Combining XML with XLink to produce HTML > > > Hi, > > My objective by combining "document1.xml" (the original XML document) > and "document2.xml" (the XLink document) is to produce HTML code like: > > ----------------------------------------------- > <p align="justify"> > <a name="ct1-1">1</a> > Please, see <a href="http://vendor1_anchor1">link</a> > </p> > ----------------------------------------------- > You can do that with a simply template, using the document() function <xsl:template match="ref"> <p align="justify"> <a name="{@id}">1</a> <!-- open the 'document2.xml' go through each plink that has a connect/@xlink:from equal to the current's node id attribute (in this case will get only one --> <xsl:for-each select="document('document2.xml')/links/plink[connect/@xlink:from=current()/ @id]"> Please, see <a href="{resource/@ID}">link</a> </xsl:for-each> </p> </xsl:template> (...) Hope this helps you. 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
|