cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guenther Schmidt <guenther.schmid...@epost.de>
Subject Re: Namespace Problem with XPath and XSLT
Date Wed, 05 Mar 2003 01:03:21 GMT
J.Pietschmann wrote:

> Guenther Schmidt wrote:
>> I've aggregated a document out of a static XML file and the output of the
>> request generator. The top level element of the request generator output
>> has its own namespace (unfortunately).
> ...
>> Due to the set namespace of the request Top element I have extreme
>> difficulty finding the proper XPath expression so that a <xsl:template
>> match="reguest????????"/> could be applied.
>> 
>> What would the propper XPath expression be (in regard to the namespace)?
> 
> FAQ. You could have been a bit more specific though.
> Declare the namespace for your request generator somewhere,
> usually this is done on the xsl:stylesheet. The prefix doesn't
> matter much, it is not necessary to use the same as in the source
> XML. You can add the prefix to the exclude-result-prefix-prefixes
> list so that your result document wouldn't be polluted.
>   <xsl:stylesheet version="..."
>     xmlns:req="uri:my:stupid:namespace" ...
> Use this prefix in match patterns:
>   <xsl:template match="req:request">...
> 
> J.Pietschmann


J. you are a genius !!!!!

Thank you very much, it worked perfectly!

However what did you mean with the "exclude-result-prefix-prefixes" ?

GŁnther


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


Mime
View raw message