Urquhart, Russ wrote:
> I don't think I am doing anything wrt namespace usage.
> 
> Should I have something specific for the current css?
> 
> I've attached the directory I created in my addon directory as well as the 
> sample I've been trying.
> 
> If you get a chance I'd appreicate it!
> 
> Thanks,

There is a misunderstanding here. The intent of the example below was
not to suggest to use the DocBook 5 namespace in your XPath expressions.

This cannot work given the fact that your Title element is in the
"http://www.xmlmind.com/xmleditor/schema/DocZone"; namespace!

As expected, replacing:
---
@namespace db5 "http://docbook.org/ns/docbook";;

CrossReference {
  text-decoration: underline;
  content: icon(left-link)
   xpath("//db5:tit...@target = substring-after(@href, '#')]") ;
  color: navy;
}
---

by:
---
@namespace dz "http://www.xmlmind.com/xmleditor/schema/DocZone";;

CrossReference {
  content: icon(left-link)
   xpath("//dz:tit...@target = substring-after(current()/@href, '#')]");
  text-decoration: underline;
  color: navy;
}
---

in css/DocZone.css, fixed your problem. See attached screenshot.


---
PS: Your custom configuration didn't work with a recent version of
XMLmind XML Editor. I had to make a number of modifications in order to
make it work in v4.5. If you are interested, I can send you an updated
DocZone.zip (without any guarantee of completeness).

Also note that in principle, we no longer provide support for such an
old version.



> 
> Russ 
> 
> -----Original Message-----
> From: Hussein Shafie [mailto:hussein at xmlmind.com] 
> Sent: Saturday, October 24, 2009 2:51 AM
> To: Urquhart, Russ
> Cc: xmleditor-support at xmlmind.com
> Subject: Re: [XXE] css xpath question
> 
> 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: DZ_CH16_Nokia_INF_5031_GS.png
Type: image/png
Size: 64983 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20091027/f5c3ca10/attachment-0001.png
 

Reply via email to