Subject: Re: [xsl] Length of a literal string containing embedded tags From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 01 Aug 2007 08:28:24 -0400 |
Could anyone tell me how I can calculate the length of a string containing inline elements?
E.g.
With a context node like this:
<text>this is some text<SUP>3</SUP>some more</text>
"string-length(.)" should return 43,
but it returns less than that.
My assumption is that the embedded tags are being treated as proper nodes rather than literal text.
Any idea how I can make sure that each character of the embedded tags counts as a character when calculating the length of the overall string?
E.g. <SUP> would count as 5 characters
-- Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Length of a literal strin, Darren Wheatley | Thread | Re: [xsl] Length of a literal strin, David Carlisle |
Re: [xsl] Selecting Median of Root , J. Zhang | Date | Re: [xsl] Length of a literal strin, Abel Braaksma |
Month |