Mark Fletcher wrote:
> In my CSS, I’m using xpath to generate link text:
> 
>  
> 
> xref:empty[href] {
> 
>                 content:
> xpath("if(document(@href,.)//title[1],document(@href,.)//title[1],'broken')");
> 
> }
> 
>  
> 
>  
> 
> This works great, but if a writer decides to provide their own link
> text, they don’t see their text displayed unless they reapply the styled
> view. 

We find this limitation acceptable given the complexity of what you want.



> However, the reverse it not true. if they remove their text, the
> generated content is shown immediately.
> 
>  
> 
> Is this inconsistency a bug? Or is there a CSS solution for this?
> 

Not an inconstency. Not a bug. You need to use label() and not xpath().
See http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/label.html

In our own CSS stylesheets, we *never* use label() because xpath() is
indeed less ``dynamic'' compared to label() however it is also much more
efficient.


 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to