xsl-list
[Top] [All Lists]

RE: [xsl] Select all heading tags

2008-12-31 04:26:58

Hi and thanks for your suggestions.
With your help I managed to get this:
"*[starts-with(local-name(),'h') and 
number(substring(local-name(),2)) ]"
Which as I understand it checks the first letter starts with 
an 'h' and is two letters long.
Am I correct?

Not quite, though your test is probably good enough for your purposes. It
tests that (a) the name starts with "h", and (b) the part of the name after
the "h" is a number, and is not zero. So it will match "h1", "h2", "h937",
"h3.14159", but not "h", "h0", or "h1x".

Michael Kay
http://www.saxonica.com/


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