cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Schneider" <volker.schnei...@danet.de>
Subject RE: XML namespaces and result of RequestGenerator
Date Wed, 27 Mar 2002 09:33:05 GMT
Hi Matthieu, Roman and Michael,

thank you very much for your quick replies.

This solved my problem.

Best regards
- Volker -

-----Original Message-----
From: Matthieu Benéteau [mailto:m.beneteau@quaternove.fr]
Sent: Mittwoch, 27. März 2002 10:16
To: cocoon-users@xml.apache.org
Subject: RE: XML namespaces and result of RequestGenerator


Hi Volker,

Here is the mail that gave me the answer :
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=100349922300307&w=2

Actually, you have to declare the "request" namespace in your stylesheet :

    xmlns:request="http://xml.apache.org/cocoon/requestgenerator/2.0"

then you match the request elements this way :

    <xsl:template match="request:request">
      ...
    </xsl:template>

    <xsl:template match="request:requestParameters">
      ...
    </xsl:template>

and so on.


Regards,
Matthieu


> -----Message d'origine-----
> De : Volker Schneider [mailto:volker.schneider@danet.de]
> Envoyé : mardi 26 mars 2002 23:33
> À : gross.sylvie@libertysurf.fr
> Objet : RE: XML namespaces and result of RequestGenerator
>
>
> Hi Matthieu,
>
> I don't find this a silly question, because I have exactly this
> problem and
> I'm searching a solution for hours. Please tell me the solution.
>
> Best regards
> - Volker -
>
> -----Original Message-----
> From: Matthieu Benéteau [mailto:m.beneteau@quaternove.fr]
> Sent: Donnerstag, 21. März 2002 19:10
> To: Cocoon-Users
> Subject: RE: XML namespaces and result of RequestGenerator
>
>
> Sorry, this was a silly question, and I found the answer in the archives.
> My mistake.
>
> Matthieu
>
>
>
> > -----Message d'origine-----
> > De : Matthieu Benéteau [mailto:m.beneteau@quaternove.fr]
> > Envoyé : jeudi 21 mars 2002 18:46
> > À : Cocoon-Users
> > Objet : XML namespaces and result of RequestGenerator
> >
> >
> > Hi,
> >
> > I have a little but annoying problem with the result of the
> > RequestGenerator : during the XSL transformation I can't match
> > any of the request elements (I can't even match the root
> > "request" element).
> >
> >
> > For instance :
> >
> >   <?xml version="1.0" encoding="iso-8859-1"?>
> >   <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> >
> >     <xsl:template match="/">
> >       <one>
> >         <xsl:value-of select="request/@target"/>
> >         <xsl:apply-templates
> > select="request/requestParameters/parameter"/>
> >         <xsl:apply-templates/>
> >       </one>
> >     </xsl:template>
> >
> >     <xsl:template match="parameter">
> >       <content>inside parameter body</content>
> >     </xsl:template>
> >
> >   </xsl:stylesheet>
> >
> > will result in an empty element : <one/>.
> >
> >
> > But on the other hand, if I use the following template :
> >
> >     <!-- by default, copy everything as is -->
> >     <xsl:template match="@*|node()">
> >       <xsl:copy>
> >         <xsl:apply-templates select="@*|node()"/>
> >       </xsl:copy>
> >     </xsl:template>
> >
> > the "one" element contains the whole request.
> >
> >
> > I suppose it's a namespace problem. The transformer doesn't seem
> > to match elements with the
> > xmlns="http://xml.apache.org/cocoon/requestgenerator/2.0"
> > namespace declaration.
> >
> > Has anyone an idea ?
> >
> >
> > Matthieu
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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