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

RE: Combining XML with XLink to produce HTML

Subject: RE: Combining XML with XLink to produce HTML
From: Américo Albuquerque <melinor@xxxxxxx>
Date: Thu, 17 Jul 2003 23:46:09 +0100
combining xml with 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


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.