xsl-list
[Top] [All Lists]

Re: [xsl] template match question

2010-12-10 21:55:05
Try 
   <xsl:template match="block[string-length(normalize-space(.))=1]">
before you dive in to trying to  actually add up the lengths of the
<inline>s.

Great, many thanks, that's exactly what I meant.

However, on trying it out, I found that any newlines and
indentation within my <block> element contribute to the
string_length, so that my <block> is no longer 1 character long
when they are present.

So I would like to ask again, but this time: how to match any
<block> in which the sum of the lengths of the child <inline>
elements is 1 character? (My newlines and indentation will be
outside any <inline> element, but all the "content" is inside
<inline> elements.) Do I need to program a loop somehow, or is
there a handy function?

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