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

RE: How namespaces are unique???

Subject: RE: How namespaces are unique???
From: "Macaulay,Malcolm (US)" <Malcolm.Macaulay2@xxxxxxxxx>
Date: Thu, 30 May 2002 07:46:24 -0500
calbit
Dennis, 

I'm not a namespaces expert but I'll give you my understanding and hopefully someone will correct me if I have it wrong..

There is no problem with the situations you have.

xmlns:calp="http://url1.com/meta/calp" 
and 
xmlns:calp-"http://url2.com/bit/calbit"
are unique namespaces. The "calp" prefix is simply the local abbreviation used by the authors in their documents. It is just a shorthand for the url. The only problem you have is that your XSLT is acting on the two documents where the authors have used the same prefix. No problem - just assign new (unique) prefixes for use in your XSLT. e,g:

<xsl:stylesheet xmlns:MyCalpPrefix="http://url1.com/meta/calp" xmlns:MyCalbitPrefix="http://url2.com/bit/calbit" ...../>

and the write XPaths to get the elements you want, e.g:

<xsl:value-of select='../MyCalpPrefix:Element'/> would get from calp:Element of the 'Calp' doc
<xsl:value-of select='../MyCalbitPrefix:Element'/> would get from calp:Element of the 'Calbit' doc

Hope that helps

cheers

Malcolm



-----Original Message-----
From: Mailer Mailer [mailto:maillistboxes@xxxxxxxxx]
Sent: 30 May 2002 07:06
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  How namespaces are unique???


Hello All,

I had a problem recently, that I was using XML from
different sources and both the sources had namespace
of same name, the name used was "calp"

both had namespace definition like this:

xmlns:calp="http://url1.com/meta/calp"

xmlns:calp-"http://url2.com/bit/calbit"


Can anyone explain me how namespace is resolving the
conflict, when the these prefix names are same???

I'll be thankful if someone can help me in this.


Regards
Dennis

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

 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.