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

selecting an element in an external doc using its id a

Subject: selecting an element in an external doc using its id attribute
From: Cindy Mazza <clm6u@xxxxxxxxxxxx>
Date: Mon, 17 Jun 2002 17:21:18 -0400
cynthia mazza
Hi ,


The following code gets me the first div3 element w/in the odes document
(as expected):

        <xsl:variable name="from" select="@from"/>
        <xsl:variable name="docnode" select="document('../texts/odes.xml')"/>
        <xsl:message>
          <xsl:value-of select="$docnode//div3"/>
        </xsl:message>

But when I try to find an element whose id attribute is equal to the
value of the 'from' variable, I get an error saying "Unexpected token
[<function>] in path expression."

        <xsl:variable name="from" select="@from"/>
        <xsl:variable name="docnode" select="document('../texts/odes.xml')"/>
        <xsl:message>
          <xsl:value-of select="$docnode//id($from)"/>
        </xsl:message>

Is it possible to do it this way, or do I need to go about it
differently? Either way, I'd appreciate any help.

Thanks.

----- 
- Cindy  

Cynthia L. Mazza
mailto:clm6u@xxxxxxxxxxxx


 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-2007 All Rights Reserved.