Subject: RE: [xsl] How namespaces are unique??? From: "Macaulay,Malcolm (US)" <Malcolm.Macaulay2@xxxxxxxxx> Date: Thu, 30 May 2002 07:46:24 -0500 |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How namespaces are unique, Salvatore Mangano | Thread | RE: [xsl] XALAN-C++ Performance..., Vetle Roeim |
[xsl] Date format, AXRAMAKR | Date | [xsl] XALAN-C++ Performance..., S. Asif Imam |
Month |