I'm trying to build a pattern that select the second descendant of the
type"articulo" of the document:
Do you mean an XSLT pattern or an XPath expression?
<doc>
<titulo>My title</titulo>
<capitulo>My capitulo I</captiulo>
<seccion>My seccion</seccion>
<articulo><head>articulo 1</head>
<p>My p</p>
</articulo>
<artiuculo><head>articulo 2</head>
<p>.....</p>
</articulo>
</seccion>
</capitulo>
I think that the pattern "//articulo[2]" is the correct but the XSLT
proccesor doesn´t found it.
//articulo[2] will find every <articulo> element in the document that is
the second <articulo> child of its parent element. If you want the second
<articulo> element in the document, use (//articulo)[2] - this is allowed as
an XPath expression but not as an XSLT pattern, hence my earlier question.
Michael Kay
Software AG
home: Michael.H.Kay@...
work: Michael.Kay@...
|