xsl-list
[Top] [All Lists]

Re: [xsl] counting element characters

2008-08-11 02:58:05
  <xsl:variable name="c" as="text()*">
          <xsl:for-each select="descendant::p">
             <xsl:value-of  select="string-length(.)"/>

Just being pedantic, you'd probably want xs:integer* as the type
there instead of text()*

 Right.  So you'd want also to replace xsl:value-of by xsl:sequence to
avoid creating text nodes.

Yep - sorry was focussing on the type and missed that one...


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>