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

document() with Cocoon 1.5

Subject: document() with Cocoon 1.5
From: Jeremy Quinn <jeremy@xxxxxxxxxxxxxxxxx>
Date: Sun, 12 Dec 1999 10:17:39 +0000
quinn cocoon
I am trying to read values from external documents
This is roughly what all the documents look like:
    (the ones doing the loading and the ones that are loaded)

<page>
    <about>blah blah blah</about>
    <title>Blah</title>
    [...]
    <links>
        <link type="parent">
            <uri>../ma.xml</uri>
        </link>
    </links>
</page>

I am trying to use this template to use the "uri" of my parent link, to pull in the top level node of parent external document into a variable, then access it's "about" and "title" elements, via the variable.

<xsl:template match="link" mode="parent">
    <xsl:variable name="lp" select="document(uri)"/>
    <a href="{uri}" title="{$lp/about}"><xsl:value-of select="$lp/title"/></a>
</xsl:template>

I am getting an empty anchor <a href="../ma.xml" title=""></a>

I also tried this, but it still does not work:

    <xsl:value-of select="document(uri)/title"/>

Is this possible with a standard Cocoon 1.5 setup?
Or am I just doing it all wrong

thanks Jeremy

   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:jeremy@xxxxxxxxxxxxxxxxx>     <http://www.media.demon.co.uk>
    <phone:+44.[0].207.737.6831>        <pager:jermq@xxxxxxxxxxxxxxx>



 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.