xsl-list
[Top] [All Lists]

RE: How to find out the namespace prefix

2005-01-21 16:51:01
name(namespace::*[.=$uri])

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Kenneth Stephen 
[mailto:marvin(_dot_)the(_dot_)cynical(_dot_)robot(_at_)gmail(_dot_)com] 
Sent: 21 January 2005 23:46
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] How to find out the namespace prefix

Hi,

    I am processing an XML Schema document with XSL. Here is 
a small snippet :

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
      xmlns:ewcm="http://w3.ibm.com/standards/xml/released/ewcm";
      targetNamespace="http://w3.ibm.com/standards/xml/released/ewcm";
      elementFormDefault="qualified">
    <xsd:element name="Metadata">
.
.

     What I'd like to do when processing the "<xsd:element
name="Metadata" line is to print out "ewcm:Metadata" . I can figure
out the URI to the namespace for Metadata by looking at the
"targetNamespace" attribute. How can I figure out if a prefix has been
defined for that namespace and if so what it is (in this case, it is
"ewcm")?

Thanks,
Kenneth

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>