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

RE: Reference elements in files listed using document(

Subject: RE: Reference elements in files listed using document( ) -Namespace problem or XPATH?
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Tue, 24 Dec 2002 16:25:35 -0800
RE:  Reference elements in files listed using document(
Howdy,

You are skipping the root element. Try:

document(@filename)/rdf:RDF/rdf:Description

But then in your template match for rdf:Description you appear to be trying to
get the value for dc:title, but you are asking for all the text in the
rdf:Description. You might want to explicitly ask for the title:

Title: <xsl:value-of select="normalize-space(dc:title)"/>

or perhaps:

<xsl:apply-templates/> and match="dc:*"

or for-each select="dc:*"

    -oOo-

make sense?

happy festivus :)
-Rob



>              <xsl:apply-templates
> select="document(@filename)/rdf:Description"/>

<snip/>

>
>   <xsl:template match="/rdf:Description">
>       <h4><xsl:text>You are here in rdf:Description.</xsl:text></h4>
>        <span class="title">Title: <xsl:value-of select="."/></span>
>   </xsl:template>
>

<snip/>

> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> 	 xmlns:dc="http://purl.org/dc/elements/1.1/">
> <rdf:Description id="d923" about="http://www.librarydataserver.com/"
<snip/>
> </rdf:Description>
> </rdf:RDF>
>
> ========================
>
> I run
>    saxon -o widget.htm   widg-main.xml   widget.xsl
>
> The initial template runs and the <xsl:for-each> gives me the proper
> filename of each file in widg-main.xml. But the
>
>  <xsl:apply-templates select="document(@filename)/rdf:Description"/>
>
> seems to be the place where the transformation ends.
>
> Seasons greetings!
>
> Bret
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 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.