Mark Fletcher wrote:

> *[conref] {
> 
> content: xpath("document(@conref)");
> 
> }


> I figured out my document() problem.  Somewhere along the way, I either
> moved my test conref'ed file or the working directory changed. Once I
> specified the full path to the file, I got it to work. Which leads to a
> question: how are paths in document() resolved? Is it relative to the
> source xml file? Or to the css file? Or something else?

The document() is a standard XSLT function. In XXE, it is supposed[*] to
work *exactly* as described here: http://www.w3.org/TR/xslt#document

Just note that:

* When used in a CSS, the context node is the element which is the
subject of the CSS rule.

* The documents accessed using document() are cached and this, with a
pretty dumb detection of modified documents.



> Also, it seems that xpath() will only return the value of the first node
> found by the expression. Is that correct? For example, if my expression
> returns a set of nodes, only the value of the first node is showing up,
> rather than a concatenation of all the node values.

xpath() is a proprietary CSS extension. It is a generalization of the
standard attr() construct.

Like attr(), xpath() is expected to return a string. In your case, it
returns a nodeset, the content of the referenced document. But
http://www.w3.org/TR/xpath says:

"A node-set is converted to a string by returning the string-value of
the node in the node-set that is first in document order. If the
node-set is empty, an empty string is returned."



---
[*] I'll check to see if there is a bug here.

---
PS: The *first* release of the DITA configuration made by XMLmind will
*not* transclude conrefs, because:
- This cannot be done decently without making XXE more generic and more
powerful.
- Lao-tzu said "a journey of a thousand miles must begin with a single
step".

Reply via email to