[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How namespaces are unique???
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
|
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
|