Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Counting self axes [Thread Next] Re: Counting self axesTo: NULL Date: 8/1/2005 8:47:00 PM
"Joris Gillis" <roac@p...> wrote in message
news:op.suui5kohyf9v9r@n......
> Hi,
> Tempore 20:28:59, die Monday 01 August 2005 AD, hinc in foro
> {comp.text.xml} scripsit <rob.guitar.rob@g...>:
>
>> This may be a stupid question, but if you count a self axe will it
>> always return 1?
>
> No, not always.
> This will only return 1 if the context node is a node which has a qname:
> i.e. elements and processing instructions.
That's not correct.
1) self::* selects the current node only if it is an element.; not if it
is a processing instruction.
If the current node is a processing instruction, then the following
expression (using the "self" axis) selects the current node:
2) self::processing-instruction()
3) Regardless of the type of the node, it is selected by:
self::node()
Cheers,
Dimitre Novatchev
> Not all XSLT - implementations follow this though: AltovaXSLT allows
> attributes as well.
>
> regards,
> --
> Joris Gillis (http://users.telenet.be/root-jg/me.html)
> Deserta faciunt et innovationem appelant
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
