RE: [xsl] Select all heading tags

Subject: RE: [xsl] Select all heading tags
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 31 Dec 2008 09:26:35 -0000
> 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

Current Thread