On Jul 3, 2008, at 10:42, knoxor wrote:

Hi

At the minute the <sup> tag is simply a html tag embedded into a text
string.
e.g "this is the body of text that has x<sup>2</sup> embedded in it"

The xml for this is (statement and statementbody are xml nodes created in my
application)

...
<statement>
<statementbody>this is the body of text that has x<sup>2</sup> embedded
in it</statementbody>
<statement>

If it looks like this, it should be recognized by the XML parser as a separate element-node.
In SAX-terms, the parser would report something like:

startElement('statement')
  characters('&#x0A;    ')
  startElement('statementBody')
    characters('this is the body of text that has x')
    startElement('sup')
      characters('2')
    endElement('sup')
    characters(' embedded&#x0A;in it')
  endElement('statementBody')
  characters('&#x0A;')
endElement('statement')

This means that the code I gave should work, if implemented correctly.

If you use XSLT-code like in your original example:

<xsl:value-of select="statement" />

This would simply return the text-value of the statement-element.

If the <sup> tag would be bare character data, at least the less-than sign would appear escaped as '&lt;', or the entire <sup> tag would be contained in a CDATA section.


HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to