cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject XPathDirectoryGenerator and NameSpaces
Date Mon, 15 Mar 2004 11:24:26 GMT
Hi All

I have a collection of documents which I am displaying to the user with  
the XPathDirectoryGenerator.

The documents have 3 namespaces declared in them, one default and two  
prefixed.

I am trying to construct an XPath expression to pull out a title to  
show for the documents, but I get no results.

The path to the element I want to read is this:

/AAF/Header/Header/Content/ContentStorage/Mobs/CompositionMob/ 
UserComments/TaggedValue/Value/rd:log/dc:Title

Where the following namespaces are declared in the document:

	xmlns="http://www.aafassociation.org/aaf-x"
	xmlns:rd="http://www.some.co.uk/rd"
	xmlns:dc="http://purl.org/dc/elements/1.1/"

In the context of an XSLT, where all of the namespaces are declared,  
the XPath expression would be this:

/aaf:AAF/aaf:Header/aaf:Header/aaf:Content/aaf:ContentStorage/aaf:Mobs/ 
aaf:CompositionMob/aaf:UserComments/aaf:TaggedValue/aaf:Value/rd:log/ 
dc:Title

Is there a special XPath expression syntax for namespaces for use in  
this circumstance?

Thanks for any help.

regards Jeremy
Mime
View raw message