Jump to content

Xs:uri Display


rlbewick

Recommended Posts

I have string of xml I would like to display as xhtml from a URI string.The XML code is:

<xs:element name="SmallCreative" type="xs:anyURI"/>

How would I go about displaying this image via xhtml through xslt?Thanks everyone, let me know if you need more specifics..

Link to comment
Share on other sites

You have posted a schema fragment. Assuming it is not the schema fragment you want to transform but rather an instance of the schema you can simply use

<xsl:template match="SmallCreative">  <img src="{.}"/></xsl:template>

or maybe, if you really want to create XHTML

<xsl:template match="SmallCreative">  <img xmlns="http://www.w3.org/1999/xhtml" src="{.}"/></xsl:template>

Link to comment
Share on other sites

You have posted a schema fragment. Assuming it is not the schema fragment you want to transform but rather an instance of the schema you can simply use
<xsl:template match="SmallCreative">  <img src="{.}"/></xsl:template>

or maybe, if you really want to create XHTML

<xsl:template match="SmallCreative">  <img xmlns="http://www.w3.org/1999/xhtml" src="{.}"/></xsl:template>

Thank you Martin, that code works great!
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...