|
Subject: Re: document() with Cocoon 1.5 From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 12 Dec 1999 18:58:31 +0000 (GMT) |
Jeremy Quinn writes:
> <page>
> <about>blah blah blah</about>
> <title>Blah</title>
...
> </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>
thats because document() returns the root of the XML document, not
the top element. you need "page/about", not "about", etc
> I also tried this, but it still does not work:
>
> <xsl:value-of select="document(uri)/title"/>
ditto. try "document(uri)/page/title"
sebastian
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| document() with Cocoon 1.5, Jeremy Quinn | Thread | Offline use of xsl in IE5, Marko Draisma |
| Offline use of xsl in IE5, Marko Draisma | Date | Re: Offline use of xsl in IE5, Steve Muench |
| Month |