[Home] [By Thread] [By Date] [Recent Entries]
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
|

Cart



