xsl-list
[Top] [All Lists]

[xsl] test on string-length of text() for element with node

2011-08-05 09:06:54
Hello,

Probably it's not difficult, but I'm struggling with the following
issue (maybe it's because it's Friday afternoon)

From an xml node set, I need to select the string-length of an
elements content without its child elements.

xml node set

<maritalstatus>
        <cs:info xmlns:cs="http://cs.nl/cs"; id="6">
                <codeList>maritalstatus</codeList>
                <instruction id="7">no instruction</instruction>
                <length>1</length>
                <minOccurs>0</minOccurs>
                <pattern>\d*</pattern>
        </cs:info>
        <cs:update xmlns:cs="http://cs.nl/cs";>
                <additionalInfo>test</additionalInfo>
                <oldData>2</oldData>
                <newData>5</newData>
        </cs:update>textstring
</maritalstatus>

From the element <maritalstatus> the string-length of only
'textstring' must be selected. How do I escape the child elements in
the xsl:value-of select.
I'm using XSLT 1.0 with xsltproc.

Regards
Bram

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--