Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Help in extracting namespace prefix of targetNamespace [SEC=UNCLASSIFIED]

From: Enrico.Raymund@-----------
To:
Date: 6/3/2008 12:55:00 AM
Thanks to Michael and Andrew, it worked!

Enrico Raymundo




                                                                           
             "Andrew Welch"                                                
             <andrew.j.welch@g                                             
             mail.com>                                                  To 
                                            xsl-list@xxxxxxxxxxxxxxxxxxxxx 
             02/06/2008 07:05               m                              
             PM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to              Re: [xsl] Help in extracting   
             xsl-list@xxxxxxxx              namespace prefix of            
              lberrytech.com                targetNamespace                
                                            [SEC=UNCLASSIFIED]             
                                                           Protective Mark 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



2008/6/2 Michael Kay <mike@xxxxxxxxxxxx>:
> With XSLT 1.0 or a 2.0 system that supports the sadly-deprecated
namespace
> axis, and with the xs:schema element as the context node, you can use
>
> name(namespace::*[. = current()/@targetNamespace])
>
> Without the namespace axis it becomes
>
> in-scope-prefixes(.)[namespace-uri-for-prefix(.) =
> current()/@targetNamespace]

That's an interesting point - why is it deprecated?

When I run the 2.0 example it complains that
namespace-uri-for-prefix() requires two arguments, so I modified it to
be:

in-scope-prefixes(.)[namespace-uri-for-prefix(., current()) eq
current()/@targetNamespace]


--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/




Important Notice: If you have received this email by mistake, please advise
the sender and delete the message and attachments immediately.  This email,
including attachments, may contain confidential, sensitive, legally
privileged and/or copyright information.  Any review, retransmission,
dissemination or other use of this information by persons or entities other
than the intended recipient is prohibited. DIAC respects your privacy and
has obligations under the Privacy Act 1988. The official departmental
privacy policy can be viewed on the department's website at www.immi.gov.au
See: http://www.immi.gov.au/functional/privacy.htm


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent