Bill Fenner wrote:
> I'm trying to validate cross-references using xpath in my css.  My XML
> can have <xref target="foo">, which refers to a <reference
> anchor="foo">.  I'm trying to find this node with
> //*...@anchor=./@target], in an xpath() function in an xref:after style,
> but it's not working.  I can't figure out what to use to refer to the
> xref node's @target inside the search.  (If I hardcode
> //*...@anchor='foo'] it works.)
> 

"//*...@anchor=./@target]" means: select all elements which have an 
"anchor" attribute equal to their "target" attribute. And of course, 
such elements do no exist.

Use this "//*...@anchor=current()/@target]" and it will work.

All this is standard XPath/XSLT, not XXE's proprietary extensions. See 
http://www.w3.org/TR/xslt#misc-func


Reply via email to