Ahhh. I had tried concatenate, but I was trying to use it with
surrounding quotes, like this:

color:
concatenate("xpath(\"document('file:///c:/program%20files/xmlmind_xml_ed
itor/addon/config/dita/css/css_strings.xml')//*...@id='blue']\")"); 


Thank you!


-----Original Message-----
From: Hussein Shafie [mailto:[email protected]] 
Sent: Wednesday, June 21, 2006 4:58 AM
To: Mark Fletcher
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] question about xpath()

Mark Fletcher wrote:
> Can xpath() be used to retrieve a string for a property value rather 
> than for generated content? I can't get it to work, but maybe I'm 
> doing something wrong.
>  
> What I'm trying to do is evaluate an xpath if() expression and return 
> (from an xml resourse file) the property value to apply. (I'm trying 
> this because the CSS selector syntax isn't powerful enough to do what 
> I
> need.)  Is there any way to accomplish this?

Yes, the trick is to use the concatenate() (see
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/simple_dynamic.
html)
pseudo-function to evaluate what is returned by xpath() as a property
value.

Here's a simple XHTML example:
---
body {
    display: block;
}

/*
 * Partial support for the Transitional DTD.
 */
body[bgcolor] {
    background-color: concatenate(xpath("./@bgcolor")); } body[text] {
    color: concatenate(xpath("./@text")); }
---




Reply via email to