[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Regarding Default Namespaces
Subject: Re: Regarding Default Namespaces
From: Manu KY <manu_kry@xxxxxxxxx>
Date: Tue, 09 Oct 2001 19:45:35 +0530
|
Hi,
in that case you can do like this:
<xsl:value-of xmlns:default = "www.apple.com" select="default:apple">
the node apple is represented in the XSLT tree by the
name-- www.apple.com:apple. which is the expanded name.
what we use in XPath expression is called the Qualified Name.
Manu
Conside this XMl:
<?xml version='1.0'?>
<?sheet type="text/xml" href="14-2.xsl"?>
<apples xmlns="www.apple.com">
<apple> no prefix</apple>
<fruits:apple xmlns:fruits='http://www.fruits.com'>
A FRUIT
<fruits:fig fruits:id="1">
A FIG
</fruits:fig>
<bbb>bbb</bbb>
</fruits:apple>
</apples>
Here, the Default Namespace applies to the first apple element which does
not have a prefix i.e.
the URI of the element apple is " www.apple.com ",
the prefix is NULL ,
and the local name is "apple".
now as a result of the XSL construct like <xsl:value-of
select="..........."/>
I want that the element node <apple> should be selected and " no prefix "
will be the value of this selected node.
Howevere, I am not able to access the element <apple> no prefix </apple>
by just givng the Xpath " //apple " since here(in the XPATH) the URI of
the apple is NULL and therefore, does not match the URI of the apple element
in the XML.
Please tell me how to access an elment whose URI is a default namespace.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|