cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Only one syntax for xpointers in xincludes?
Date Wed, 23 Feb 2005 10:57:42 GMT
On Wed, 2005-02-23 at 11:34 +0100, Claus Bech Rasmussen - TELMORE wrote:
> Hi folks,
> 
> I'm using xincludes in documents served up by Cocoon (Well, by Forrest,
> actually). I've read
> http://cocoon.apache.org/2.1/userdocs/transformers/xinclude-transformer.
> html but have a question about the syntax of xpointers in xincludes:
> 
> The only thing that I can get to work is what's described in the above
> document:
> 
> <xi:include href="myfile.xml#xpointer(/path/to/element)"/>
> 
> What I would like to do is to use the xpointer attribute and just point
> to an ID in the target doc:
> 
> <xi:include href="myfile.xml" xpointer="my.element.id"/>
> 
> However, when I try this syntax, the entire document is included. Is
> this the intended behavior?

There are two problems with this approach:

1. it's not supported by Cocoon. I suppose the xpointer attribute is
something that got added in a recent version of the spec (at least, more
recent then the last update to Cocoon's implementation).

2. lookups based on IDs are not supported, since this would require
validating the document against a DTD. The alternative is to use
something like //*[@id='my.element.id'], which should work equally well.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message