xsl-list
[Top] [All Lists]

Re: [xsl] Select all heading tags

2008-12-31 04:14:20
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?

--------------------------------------------------
From: "Michael Kay" <mike(_at_)saxonica(_dot_)com>
Sent: Tuesday, December 30, 2008 9:49 AM
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] Select all heading tags

It could be:

select="*[starts-with(local-name(), 'h')]"

...if that's sufficient, if not maybe use matches() with a
suitable regex.

or perhaps select="*['h9'=translate(local-name(), '123456789',
'999999999')]"

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



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