|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Bad schemas
Jeff Shevlen wrote:
Hi,
Try <?xml version = "1.0" encoding = "UTF-8"?> <xsl:stylesheet version = "1.0" xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:skills = "http://www.abc.com/skills"> <xsl:output method = "xml" indent = "yes"/> <xsl:template match = "//skills:related_skill">
<xsl:element name = "test">
<xsl:text>XXXX </xsl:text>
<xsl:attribute name = "skill_IDREF">
<xsl:value-of select = "@skills:skill_IDREF"/>
</xsl:attribute>
</xsl:element>
</xsl:template>BTW regarding the template above:
1. You can write it much shorter
2. It probably wont work, because you add the text child
before the attribute.
Try
<xsl:template match = "//skills:related_skill">
<test skill_IDREF="{@skills:skill_IDREF}">
<xsl:text>XXXX </xsl:text>
</test>
</xsl:template>
instead.Note that the "test" element is in the default namespace, not in the skills namespace. J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








