Hi all,
i am running into problems with XSL where I want to be able to nest xml elements in my schema like this:
<xs:element name="text">
<xs:complexType mixed="true">
<xs:all minOccurs="0">
<xs:element name="bold" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
an example being:
<text>this is a sample text with a <bold>bold</bold> word in it</text>
this should be translated to
this is a sample text with a bold word in it
but i don't seem to get my xsl right.
At the moment i tried a few things, the most effective being
<xsl:when test="text/bold">
<xsl:value-of select="text"></xsl:value-of><b><xsl:value-of select="text/bold"></xsl:value-of></b>
</xsl:when>
which results in
this is a sample text with a bold word in itbold
i am totally at a los at this moment.
all the other hard things (like automatic numbering, index building, image lists, in-document linking etc) i had to do i finished well ahead of time, but this tiny thing I can't seem to finish.
i am running into problems with XSL where I want to be able to nest xml elements in my schema like this:
<xs:element name="text">
<xs:complexType mixed="true">
<xs:all minOccurs="0">
<xs:element name="bold" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
an example being:
<text>this is a sample text with a <bold>bold</bold> word in it</text>
this should be translated to
this is a sample text with a bold word in it
but i don't seem to get my xsl right.
At the moment i tried a few things, the most effective being
<xsl:when test="text/bold">
<xsl:value-of select="text"></xsl:value-of><b><xsl:value-of select="text/bold"></xsl:value-of></b>
</xsl:when>
which results in
this is a sample text with a bold word in itbold
i am totally at a los at this moment.
all the other hard things (like automatic numbering, index building, image lists, in-document linking etc) i had to do i finished well ahead of time, but this tiny thing I can't seem to finish.