Urquhart, Russ wrote:
> 
> However, I tried both versions of this xpath expression: 
> 
> xpath("//tit...@target = substring-after(current()/@href, '#')]")

This one should work fine.



> And
> 
> xpath("//tit...@target = substring-after(@href, '#')]")

This one cannot work. I've attempted to explain why.



> In this css code:
> CrossReference {
>       color: blue;
>       text-decoration: underline;
>       content: icon(left-link) xpath("//tit...@target = 
> substring-after(@href, '#')]")  ;
> 
>     vertical-align: text-top; 
>     color: navy;
> }
> 
> All I get is the link icon and nothing else.
> 
> Is there something else I can try?
> 

--> No. Please *double-check* what you did, because what I told you is
100% correct and XMLmind XML Editor has no bug related to what you do.

Also please check your namespace declararations if any, and remember
that XPath expressions do not support the default namespace feature.

--> I've reproduced your case using a DocBook 5 document in which:

* title/@role is used instead of Title/@Target

* phrase/@xmlink:href is used instead of CrossReference/@href

I've added this to docbook5.css:
---
@namespace db5 "http://docbook.org/ns/docbook";;
...
@namespace xlink "http://www.w3.org/1999/xlink";;

phrase[xlink|href] {
  content: icon(left-link)
    xpath("//db5:tit...@role = substring-after(current()/@xlink:href,
'#')]");

  text-decoration: underline;
  color: navy;
}
---

And as expected it works fine. See attached TestXRef.xml and screenshot
TestXRef.png.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestXRef.png
Type: image/png
Size: 81252 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20091024/e1977415/attachment-0001.png
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestXRef.xml
Type: text/xml
Size: 883 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20091024/e1977415/attachment-0001.xml
 

Reply via email to