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

Re: "value-of select" attributes with a namespace

Subject: Re: "value-of select" attributes with a namespace
From: Marian Olteanu <mou_softwin@xxxxxxxxx>
Date: Tue, 7 Dec 2004 23:08:32 -0800 (PST)
value of select namespace
<xsl:value-of select="@r:status"/> should do.
But I cannot understand why you are using namespace for attributes. As long as your attribute
refers only to a particular element (probably belonging to a particular namespace), it is good
practice not to assign a namespace to that attribute (leave namespace URI null), which is
something like the "virtual namespace" of the attribute is the element (with its namespace URI).
The only case in which you assing namespace URI to an attribute is when that attribute can be
attached to any element, like xml:space, xml:lang, xml:base etc.


--- Derek Basch <dbasch@xxxxxxxxx> wrote:

> Can anyone tell me why I can't value-of select attributes with a namespace? I
> dont get the value of the 'status' attribute returned but I can see that the
> transaction element is matched using an XSLT Debugger. Any Ideas? I am using
> Firefox v1.
> 
> XML
> ------------------------------------------------------
> <?xml version='1.0' encoding='UTF-8'?>
> <!DOCTYPE receipt SYSTEM "http://172.20.0.70:81/evaluator/receipt.dtd">
> <?xml-stylesheet type="text/xsl"
> href="http://172.20.0.70:81/evaluator/receipt.xsl"?>
> <r:receipt xmlns:r='http://172.20.0.70:81/receipt/'
> r:received='2004-12-07T14:19:33.438918-08:00'>
>   <r:transaction r:status='http://172.20.0.70:81/smm/set1/status'
> r:uri='http://172.20.0.70:81/smm/set1'/>
> </r:receipt>
> 
> XSL
> -------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>  xmlns:r="http://172.20.0.70:81/receipt/">
> 
> <xsl:output method="text"/>
>  
> <xsl:template match="/">
> <xsl:apply-templates select="r:receipt/r:transaction"/>
> </xsl:template>
> 
> <xsl:template match="/r:receipt/r:transaction">
> <xsl:value-of select="@status"/>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Read only the mail you want - Yahoo! Mail SpamGuard. 
> http://promotions.yahoo.com/new_mail 
> 
> 


=====
Marian
http://www.utdallas.edu/~mgo031000/


		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page  Try My Yahoo!
http://my.yahoo.com 

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.