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

Re: XSLT 1.0 Namespace Help

Subject: Re: XSLT 1.0 Namespace Help
From: "Bridger Dyson-Smith bdysonsmith@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Aug 2014 14:35:49 -0000
Re:  XSLT 1.0 Namespace Help
Hi all,

I think I found my problem. I changed the XPath to something more generic

<xsl:for-each
select="$queryDoc/*[local-name()='sparql']/*[local-name()='results']/*[local-name()='result']/*[local-name()='collection']/@uri">

and now it's working.
Apologies for the noise.
Best,
Bridger



On Mon, Aug 25, 2014 at 10:17 AM, Bridger Dyson-Smith bdysonsmith@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi all,
>
> I'm trying to reference the following XML document:
>
>     <?xml version="1.0" encoding="UTF-8"?>
>     <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result">
>     <head>
>         <variable name="collection"/>
>     </head>
>     <results>
>         <result>
>             <collection uri="info:fedora/islandora:root"/>
>         </result>
>         <result>
>             <collection uri="info:fedora/digital:collections"/>
>         </result>
>         <result>
>             <collection uri="info:fedora/collections:gsmrc"/>
>         </result>
>         <result>
>             <collection uri="info:fedora/gsmrc:webster"/>
>         </result>
>     </results>
>     </sparql>
>
> in a variable:
>
>     <xsl:variable name="queryDoc" select="document('example.xml')"/>
>
> Later in my stylesheet, I'm trying to get at the `@uri` values with the
> following:
>
>     <xsl:for-each select="$queryDoc//collection/@uri">
>         <filterName>
>             <xsl:value-of select="."/>
>         </filterName>
>     </xsl:for-each>
>
> But I'm having problems getting to that value. When I look at the XPath in
> oXygen, the path to @uri is
> /default:sparql/default:results/default:result/default:collection/@uri but
> using that isn't working, either. So, I either have a syntax error in my
> XPath or I'm just plain doing it wrong.
>
> Am I overlooking something in that expression?
> Thank you for your time and trouble.
>
> Best,
> Bridger
>   XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/1230532> (by
> email <>)

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.