xsl-list
[Top] [All Lists]

Re: Counting elements with count() and position()

2003-07-10 06:38:12
Hi Roman,

your XSL File isn't well-formed, because you can't us '<','>' inside
your Styhlesheets, instead use '&lt;' for '<' and '&gt;' for '>'

so correct your xsl:when like this

 <xsl:when test="$addresscount &gt; 1">urls:</xsl:when>

Actually, it's perfectly legal to use an unescaped > wherever you want
in XML (aside from after ]] in element content). Using > within an
attribute value is always OK. You're correct that < must always be
escaped, as must &, wherever they occur. ' must be escaped in
attribute values delimited by ' and similarly " must be escaped in
attribute values delimited by ", but there's no need to escape them
otherwise.

Of course, to be on the safe side, you can escape all these special
characters wherever you find them, but the situations where an
unescaped > will cause a problem are few and far between.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list