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

XML schema general convert with XSLT (namespaces..)

Subject: XML schema general convert with XSLT (namespaces..)
From: ronald heller <ronald@xxxxxxxxxxx>
Date: Fri, 21 Sep 2001 09:32:47 +0200
convert to xslt
Hi,

Suppose I want to write a general convertor for XML schema,
example:
<xs:element name="Access-code" type="xs:string"/>

sample code:
<xsl:choose>
	<xsl:when test="@type='xsd:string'">
		<xsl:text>Text</xsl:text>
	</xsl:when>
	<xsl:otherwise>
		<xsl:text>UNKNOWN TYPE </xsl:text>
		<xsl:value-of select="@type"/>
	</xsl:otherwise>
</xsl:choose>

(suppose : The xsd: is equal to the xs namespace)

So in the above the output is:
<P>UNKNOWN TYPE xs:string</P>

When I change the namespace prefix into xs:
<P>Text</P>

I have to know somehow in which namespace it is written, somehow. Is there anyway of telling which namespace is used?
Sure I can give the used namespace as a paramter etc., but that really doesn't feel right.


Any suggestions?


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.