You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Arsen A. Gutsal" <ar...@softsky.com.ua> on 2005/02/26 13:18:35 UTC
CForms, Xindice, XPath question
Hello List.
I've the problem storing/editing my customers list in Xindice database.
So, I use CForms binding directly to xindice url.
Mty biding file starts as:
<fb:context
xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
path="customers/customer">
But, I guess that's not correct, coz for INSERT operation it probably
could be OK, but for EDIT operation I should use some kind of xpath
pointing binding to correct customer id e.g.
<fb:context
xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
path="customers/customer[@id = some_id]">
My questions are:
1. Is that correct? Or I should use xpath uppon selection data in
xindice-URL (e.g. xmldb:xindice-embed:///db/void/customers/customer[@id
= $some_id];
2. If so, and I could select ALL records, how then point binding in
<fd:context> node?
3. How to separate INSERT and UPDATE in binding.
--
Sincerely,
Arsen A. Gutsal
SOFTSKY Ltd CEO/Executive
SOFTSKY - Cost effective Software Development
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: No pipeline matched request - SOLVED
Posted by Kjell Arne Brødreskift <ka...@web-som-virker.no>.
Thank you very much, Adam. That did the trick. In retrospect it's
strange I didn't see that, but isn't it always?
Best Regards
and thanks again,
Kjell Arne
On Mon, 2005-02-28 at 12:45 +1300, Adam Ratcliffe wrote:
>
> Hi Kjell
>
> I added your mappings to my sitemap and using stylesheet
> menunode_extract.xsl, menunode.xml, and a dummy templateBuilder
> pipeline was able to match it fine.
>
> I think you may need to take another look at the templateBuilder
> pipeline. The source for the generator for this pipeline is
> referencing
> your namespace stripping stylesheet, probably not what you want.
>
> In your HTML matching pipeline you could just use the file generator
> to read the menunode XML document directly as your
> transform is only copying the content of the source document to the
> output anyway.
>
> Cheers
> Adam
>
> -----Original Message-----
> From: Kjell Arne Brødreskift [mailto:kab@web-som-virker.no]
> Sent: Monday, 28 February 2005 11:37 a.m.
> To: adam@prema.co.nz
> Cc: users@cocoon.apache.org
> Subject: RE: No pipeline matched request - but it's there?
>
>
> Hi Adam, the request is made from the stylesheet
> menunode_extract.xsl:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns:ci="http://apache.org/cocoon/include/1.0"
>
> xmlns:men="http://www.web-som-virker.no/namespaces/menunode"
> xmlns:ns="http://apache.org/cocoon/include/1.0"
> xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform
> note.xsd">
> <xsl:output method="xml" indent="yes"/>
> <xsl:template match="/">
> <xsl:copy-of select="/men:menunode/ns:include"/>
> </xsl:template>
> </xsl:stylesheet>
>
>
> ...which is parsing the menunode xml document:
>
>
> <?xml version="1.0"?>
>
> <men:menunode
> xmlns:men="http://www.web-som-virker.no/namespaces/menunode">
> <ns:include
> src="cocoon://templateBuilder?menu_url=index.xml.preformat&menu_name=Startside&menu_title=Home of the brave!&layout_template=lay-frontpage.xsl&document_template=doc-frontpage.xsl&document_url=1.html&document_id=1" xmlns:ns="http://apache.org/cocoon/include/1.0"/>
> </men:menunode>
>
>
> The whole point is to return the <ns:include> src-attribute to
> the sitemap and break it up into parameters inside the
> templateBuilder match.
>
>
>
> Kjell Arne
>
>
>
>
>
>
>
>
>
>
>
> On Mon, 2005-02-28 at 10:58 +1300, Adam Ratcliffe wrote:
>
> >
> > Hi Kjell
> >
> > How are you requesting the 'templateBuilder' resource, from
> > the browser, a sitemap redirect, or flowscript?
> >
> > Cheers
> > Adam
> >
> > -----Original Message-----
> > From: Kjell Arne Brødreskift
> > [mailto:kab@web-som-virker.no]
> > Sent: Monday, 28 February 2005 6:48 a.m.
> > To: users@cocoon.apache.org
> > Subject: No pipeline matched request - but it's
> > there?
> >
> >
> > Hi list.
> >
> > I get an unexpected error message from Cocoon trying
> > to match the word 'templateBuilder':
> >
> > org.apache.cocoon.ResourceNotFoundException: No
> > pipeline matched request: templateBuilder
> >
> > But the match is there. Here are excerpts from the
> > pipeline:
> >
> > <map:match pattern="">
> > <map:redirect-to uri="index.html"/>
> > </map:match>
> >
> > <map:match pattern="**.html">
> > <map:generate src="site/{1}.menunode"/>
> > <map:transform
> > src="style/menunode_extract.xsl"/>
> > <map:transform type="cinclude"/>
> > <map:transform src="style/removeNsPrefix.xsl"/>
> > <map:serialize type="html"/>
> > </map:match>
> >
> > <map:match pattern="templateBuilder">
> > <map:generate src="style/removeNsPrefix.xsl"/>
> > <map:transform
> > src="style/layout/{request-param:layout_template}">
> > <map:parameter name="menu_url"
> > value="{request-param:menu_url}"/>
> > <map:parameter name="menu_name"
> > value="{request-param:menu_name}"/>
> > <map:parameter name="menu_title"
> > value="{request-param:menu_title}"/>
> > <map:parameter name="layout_template"
> > value="{request-param:layout_template}"/>
> > <map:parameter name="document_template"
> > value="{request:document_template}"/>
> > <map:parameter name="document_url"
> > value="{request:document_url}"/>
> > <map:parameter name="document_id"
> > value="{request:document_id}"/>
> > </map:transform>
> > <map:transform type="cinclude"/>
> > <map:serialize type="xml"/>
> > </map:match>
> >
> >
> > Does anyone know why Cocoon would return this error
> > message when the match really is in the pipeline?
> >
> >
> > Thanks, Kjell Arne
RE: No pipeline matched request - but it's there?
Posted by Adam Ratcliffe <ad...@prema.co.nz>.
Hi Kjell
I added your mappings to my sitemap and using stylesheet menunode_extract.xsl, menunode.xml, and a dummy templateBuilder
pipeline was able to match it fine.
I think you may need to take another look at the templateBuilder pipeline. The source for the generator for this pipeline is referencing
your namespace stripping stylesheet, probably not what you want.
In your HTML matching pipeline you could just use the file generator to read the menunode XML document directly as your
transform is only copying the content of the source document to the output anyway.
Cheers
Adam
-----Original Message-----
From: Kjell Arne Brødreskift [mailto:kab@web-som-virker.no]
Sent: Monday, 28 February 2005 11:37 a.m.
To: adam@prema.co.nz
Cc: users@cocoon.apache.org
Subject: RE: No pipeline matched request - but it's there?
Hi Adam, the request is made from the stylesheet menunode_extract.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ci="http://apache.org/cocoon/include/1.0"
xmlns:men="http://www.web-som-virker.no/namespaces/menunode"
xmlns:ns="http://apache.org/cocoon/include/1.0"
xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform note.xsd">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="/men:menunode/ns:include"/>
</xsl:template>
</xsl:stylesheet>
...which is parsing the menunode xml document:
<?xml version="1.0"?>
<men:menunode xmlns:men="http://www.web-som-virker.no/namespaces/menunode">
<ns:include src="cocoon://templateBuilder?menu_url=index.xml.preformat&menu_name=Startside&menu_title=Home of the brave!&layout_template=lay-frontpage.xsl&document_template=doc-frontpage.xsl&document_url=1.html&document_id=1" xmlns:ns="http://apache.org/cocoon/include/1.0"/>
</men:menunode>
The whole point is to return the <ns:include> src-attribute to the sitemap and break it up into parameters inside the templateBuilder match.
Kjell Arne
On Mon, 2005-02-28 at 10:58 +1300, Adam Ratcliffe wrote:
Hi Kjell
How are you requesting the 'templateBuilder' resource, from the browser, a sitemap redirect, or flowscript?
Cheers
Adam
-----Original Message-----
From: Kjell Arne Brødreskift [mailto:kab@web-som-virker.no]
Sent: Monday, 28 February 2005 6:48 a.m.
To: users@cocoon.apache.org
Subject: No pipeline matched request - but it's there?
Hi list.
I get an unexpected error message from Cocoon trying to match the word 'templateBuilder':
org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: templateBuilder
But the match is there. Here are excerpts from the pipeline:
<map:match pattern="">
<map:redirect-to uri="index.html"/>
</map:match>
<map:match pattern="**.html">
<map:generate src="site/{1}.menunode"/>
<map:transform src="style/menunode_extract.xsl"/>
<map:transform type="cinclude"/>
<map:transform src="style/removeNsPrefix.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="templateBuilder">
<map:generate src="style/removeNsPrefix.xsl"/>
<map:transform src="style/layout/{request-param:layout_template}">
<map:parameter name="menu_url" value="{request-param:menu_url}"/>
<map:parameter name="menu_name" value="{request-param:menu_name}"/>
<map:parameter name="menu_title" value="{request-param:menu_title}"/>
<map:parameter name="layout_template" value="{request-param:layout_template}"/>
<map:parameter name="document_template" value="{request:document_template}"/>
<map:parameter name="document_url" value="{request:document_url}"/>
<map:parameter name="document_id" value="{request:document_id}"/>
</map:transform>
<map:transform type="cinclude"/>
<map:serialize type="xml"/>
</map:match>
Does anyone know why Cocoon would return this error message when the match really is in the pipeline?
Thanks, Kjell Arne
RE: No pipeline matched request - but it's there?
Posted by Kjell Arne Brødreskift <ka...@web-som-virker.no>.
Hi Adam, the request is made from the stylesheet menunode_extract.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ci="http://apache.org/cocoon/include/1.0"
xmlns:men="http://www.web-som-virker.no/namespaces/menunode"
xmlns:ns="http://apache.org/cocoon/include/1.0"
xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform note.xsd">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="/men:menunode/ns:include"/>
</xsl:template>
</xsl:stylesheet>
...which is parsing the menunode xml document:
<?xml version="1.0"?>
<men:menunode
xmlns:men="http://www.web-som-virker.no/namespaces/menunode">
<ns:include
src="cocoon://templateBuilder?menu_url=index.xml.preformat&menu_name=Startside&menu_title=Home of the brave!&layout_template=lay-frontpage.xsl&document_template=doc-frontpage.xsl&document_url=1.html&document_id=1" xmlns:ns="http://apache.org/cocoon/include/1.0"/>
</men:menunode>
The whole point is to return the <ns:include> src-attribute to the
sitemap and break it up into parameters inside the templateBuilder
match.
Kjell Arne
On Mon, 2005-02-28 at 10:58 +1300, Adam Ratcliffe wrote:
>
> Hi Kjell
>
> How are you requesting the 'templateBuilder' resource, from the
> browser, a sitemap redirect, or flowscript?
>
> Cheers
> Adam
>
> -----Original Message-----
> From: Kjell Arne Brødreskift [mailto:kab@web-som-virker.no]
> Sent: Monday, 28 February 2005 6:48 a.m.
> To: users@cocoon.apache.org
> Subject: No pipeline matched request - but it's there?
>
>
> Hi list.
>
> I get an unexpected error message from Cocoon trying to match
> the word 'templateBuilder':
>
> org.apache.cocoon.ResourceNotFoundException: No pipeline
> matched request: templateBuilder
>
> But the match is there. Here are excerpts from the pipeline:
>
> <map:match pattern="">
> <map:redirect-to uri="index.html"/>
> </map:match>
>
> <map:match pattern="**.html">
> <map:generate src="site/{1}.menunode"/>
> <map:transform src="style/menunode_extract.xsl"/>
> <map:transform type="cinclude"/>
> <map:transform src="style/removeNsPrefix.xsl"/>
> <map:serialize type="html"/>
> </map:match>
>
> <map:match pattern="templateBuilder">
> <map:generate src="style/removeNsPrefix.xsl"/>
> <map:transform
> src="style/layout/{request-param:layout_template}">
> <map:parameter name="menu_url"
> value="{request-param:menu_url}"/>
> <map:parameter name="menu_name"
> value="{request-param:menu_name}"/>
> <map:parameter name="menu_title"
> value="{request-param:menu_title}"/>
> <map:parameter name="layout_template"
> value="{request-param:layout_template}"/>
> <map:parameter name="document_template"
> value="{request:document_template}"/>
> <map:parameter name="document_url"
> value="{request:document_url}"/>
> <map:parameter name="document_id"
> value="{request:document_id}"/>
> </map:transform>
> <map:transform type="cinclude"/>
> <map:serialize type="xml"/>
> </map:match>
>
>
> Does anyone know why Cocoon would return this error message
> when the match really is in the pipeline?
>
>
> Thanks, Kjell Arne
RE: No pipeline matched request - but it's there?
Posted by Adam Ratcliffe <ad...@prema.co.nz>.
Hi Kjell
How are you requesting the 'templateBuilder' resource, from the browser, a sitemap redirect, or flowscript?
Cheers
Adam
-----Original Message-----
From: Kjell Arne Brødreskift [mailto:kab@web-som-virker.no]
Sent: Monday, 28 February 2005 6:48 a.m.
To: users@cocoon.apache.org
Subject: No pipeline matched request - but it's there?
Hi list.
I get an unexpected error message from Cocoon trying to match the word 'templateBuilder':
org.apache.cocoon.ResourceNotFoundException: No pipeline matched request: templateBuilder
But the match is there. Here are excerpts from the pipeline:
<map:match pattern="">
<map:redirect-to uri="index.html"/>
</map:match>
<map:match pattern="**.html">
<map:generate src="site/{1}.menunode"/>
<map:transform src="style/menunode_extract.xsl"/>
<map:transform type="cinclude"/>
<map:transform src="style/removeNsPrefix.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="templateBuilder">
<map:generate src="style/removeNsPrefix.xsl"/>
<map:transform src="style/layout/{request-param:layout_template}">
<map:parameter name="menu_url" value="{request-param:menu_url}"/>
<map:parameter name="menu_name" value="{request-param:menu_name}"/>
<map:parameter name="menu_title" value="{request-param:menu_title}"/>
<map:parameter name="layout_template" value="{request-param:layout_template}"/>
<map:parameter name="document_template" value="{request:document_template}"/>
<map:parameter name="document_url" value="{request:document_url}"/>
<map:parameter name="document_id" value="{request:document_id}"/>
</map:transform>
<map:transform type="cinclude"/>
<map:serialize type="xml"/>
</map:match>
Does anyone know why Cocoon would return this error message when the match really is in the pipeline?
Thanks, Kjell Arne
No pipeline matched request - but it's there?
Posted by Kjell Arne Brødreskift <ka...@web-som-virker.no>.
Hi list.
I get an unexpected error message from Cocoon trying to match the word
'templateBuilder':
org.apache.cocoon.ResourceNotFoundException: No pipeline matched
request: templateBuilder
But the match is there. Here are excerpts from the pipeline:
<map:match pattern="">
<map:redirect-to uri="index.html"/>
</map:match>
<map:match pattern="**.html">
<map:generate src="site/{1}.menunode"/>
<map:transform src="style/menunode_extract.xsl"/>
<map:transform type="cinclude"/>
<map:transform src="style/removeNsPrefix.xsl"/>
<map:serialize type="html"/>
</map:match>
<map:match pattern="templateBuilder">
<map:generate src="style/removeNsPrefix.xsl"/>
<map:transform src="style/layout/{request-param:layout_template}">
<map:parameter name="menu_url" value="{request-param:menu_url}"/>
<map:parameter name="menu_name" value="{request-param:menu_name}"/>
<map:parameter name="menu_title"
value="{request-param:menu_title}"/>
<map:parameter name="layout_template"
value="{request-param:layout_template}"/>
<map:parameter name="document_template"
value="{request:document_template}"/>
<map:parameter name="document_url" value="{request:document_url}"/>
<map:parameter name="document_id" value="{request:document_id}"/>
</map:transform>
<map:transform type="cinclude"/>
<map:serialize type="xml"/>
</map:match>
Does anyone know why Cocoon would return this error message when the
match really is in the pipeline?
Thanks, Kjell Arne