You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sven Wontroba <sv...@gmx.de> on 2005/09/27 19:47:45 UTC

Re[2]: JXPath within cocoon 2.1.7

Hi

I change to Xalan 2.1.7 and there is no change. (I just copied the
xalan.jar file in the cocoon\WEB-INF\lib directory) do I have to change
something else?

I get my content if I just send
them out via  cocoon.sendPage("index.jx", {"result" : myDOMDocument} );
and my context has the value
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl@15b25a1
so I assume it's ok

If I try to modify my context via the .getValue method I'm getting the
following error line 33: uncaught JavaScript exception: at main xxxxx
stating the line where I specify my xpath part,..

I'll look further into the other recommendation to se if there is way
to register a default namespace?

I just started with cocoon so sorry if I'm asking strange questions,
but I'm sure we will find a solution :o)

Thanks for all you help
Sven

>>Hello Experts
>>
>>I have a question about namespaces and JXPath within cocoon 2.1.7 on a
>>xp sp2 machine Somehow it doesn't work out for me and I don't get a
>>specific response. Or lets say the one I expect
>>
>>This is how I try to use it in my flow script  ---
>>var context =
>>org.apache.commons.jxpath.JXPathContext.newContext(myDOMDocument);
>>context.registerNamespace("xhtml", "http://www.w3.org/1999/xhtml");
>>context.registerNamespace("timesheet",
>>"http://www.x-smiles.org/2004/timesheet");
>>context.registerNamespace("ev", "http://www.w3.org/2001/xml-events");
>>var result = context.getValue("//Description");
>>
>>cocoon.sendPage("index.jx", {"result" : result} );
>>
> Did you retrieve the contents of myDOMDocument by the 
> processToDOM-method in PipelineUtil?

> If so, I have experienced the same problems. It might be related to
> an older development version of Xalan shipped with 2.1.7 (try
> upgrading to 2.7.0) Askild :-)


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


Re: JXPath within cocoon 2.1.7

Posted by Askild Aaberg Olsen <as...@xangeli.com>.
Sven Wontroba wrote:

>I changed my file and it works.
>Thanks a lot again, also to Jason Johnston
>
>Sven
>
>  
>
Good to know!

As i recall, my own problem was related to attributes in a namespace, 
when this was read with processToDOM.

Askild
-

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


Re[3]: JXPath within cocoon 2.1.7

Posted by Sven Wontroba <sv...@gmx.de>.
Thanks a lot for your quick response this would have been my next step

I found at
http://nagoya.apache.org/eyebrowse/ReadMsg?listId=105&msgNo=1083 an
older thread about it Subject: [Jelly] Namespace and xml taglibrary


> Did you remove the old one? I think I might be wrong on this,
> though...

jep but kept a copy ;) with files it's like stuff in the house you
keep it and keep it,..  you never know if you need them again, if the
house is full you have to get a new one ;)

> You do not have to register it as a default namespace. Just assign a
> prefix of choice (e.g. "foo")  to the namespace and use that, e.g.
> /fo:something.

> Look at

> http://www.dpawson.co.uk/xsl/sect2/N5536.html#d6629e1012

> for a clarification on default namespaces. This is on XSLT, but the
> same should apply here. Askild -

I changed my file and it works.
Thanks a lot again, also to Jason Johnston

Sven


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


Re: JXPath within cocoon 2.1.7

Posted by Askild Aaberg Olsen <as...@xangeli.com>.
Sven Wontroba wrote:

>Hi
>
>I change to Xalan 2.1.7 and there is no change. (I just copied the
>xalan.jar file in the cocoon\WEB-INF\lib directory) do I have to change
>something else?
>
>  
>
Did you remove the old one? I think I might be wrong on this, though...

>If I try to modify my context via the .getValue method I'm getting the
>following error line 33: uncaught JavaScript exception: at main xxxxx
>stating the line where I specify my xpath part,..
>
>I'll look further into the other recommendation to se if there is way
>to register a default namespace?
>
>I just started with cocoon so sorry if I'm asking strange questions,
>but I'm sure we will find a solution :o)
>
>  
>
You do not have to register it as a default namespace. Just assign a 
prefix of choice (e.g. "foo")  to the namespace and use that, e.g. 
/fo:something.

Look at

http://www.dpawson.co.uk/xsl/sect2/N5536.html#d6629e1012

for a clarification on default namespaces. This is on XSLT, but the same 
should apply here.

Askild
-

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