tnx, now is ok

________________________________
Da: Karr, David [mailto:[EMAIL PROTECTED]
Inviato: venerdì 10 ottobre 2008 17.16
A: xmltask-users@lists.sourceforge.net
Oggetto: Re: [Xmltask-users] R: Attribute change issue when xmlns is present

Try replacing ":beans" with "/:beans".

________________________________
From: Verre Raffaele [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2008 8:12 AM
To: Mark Coffin; xmltask-users@lists.sourceforge.net
Subject: [Xmltask-users] R: Attribute change issue when xmlns is present

uhm...
there's something wrong:

when I evaluate the xpath :beans/:[EMAIL PROTECTED]'router'] before executing


        <xmltask source="invoker.xml" dest="invoker.xml" report="true" 
preserveType="true">
               <attr path=":beans/:[EMAIL PROTECTED]'router']" attr="class" 
value="myvalue"/>
          </xmltask>


I have:

javax.xml.transform.TransformerException: A location path was expected, but the 
following token was encountered:  :beans
        at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:608)
        at 
org.apache.xpath.compiler.XPathParser.LocationPath(XPathParser.java:1599)
        at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1315)
        at 
org.apache.xpath.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
        at 
org.apache.xpath.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
        at 
org.apache.xpath.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
        at 
org.apache.xpath.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
        at 
org.apache.xpath.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
        at 
org.apache.xpath.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
        at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:832)
        at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:805)
        at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:788)
        at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:127)
        at org.apache.xpath.XPath.<init>(XPath.java:176)
        at org.apache.xpath.XPathAPI.eval(XPathAPI.java:232)
        at org.apache.xpath.XPathAPI.eval(XPathAPI.java:189)


________________________________
Da: Mark Coffin [mailto:[EMAIL PROTECTED]
Inviato: venerdì 10 ottobre 2008 16.43
A: Verre Raffaele; xmltask-users@lists.sourceforge.net
Oggetto: RE: [Xmltask-users] Attribute change issue when xmlns is present

Hi Verre,

If your using dtd's or xmlns I think you have to reference it with a colon : 
like this:


<xmltask source="invoker.xml" dest="invoker.xml" report="true" 
preserveType="true">
       <attr path=":beans/:[EMAIL PROTECTED]'router']" attr="class" 
value="it.pitagora.otherClass"/>
</xmltask>



   Mark Coffin
   [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
   Phone: 905.632.0864
   1.800.668.8486
   Fax: 905.632.2605
   www.aalsolutions.com<http://www.aalsolutions.com>
________________________________
From: Verre Raffaele [mailto:[EMAIL PROTECTED]
Sent: October 10, 2008 10:37 AM
To: xmltask-users@lists.sourceforge.net
Subject: [Xmltask-users] Attribute change issue when xmlns is present

Hi
I have an xml file like this:

<beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd";>
        <bean class="it.pitagora.myClass" id="router"/>
</beans>

when I execute the code:

<xmltask source="invoker.xml" dest="invoker.xml" report="true" 
preserveType="true">
       <attr path="beans/[EMAIL PROTECTED]'router']" attr="class" 
value="it.pitagora.otherClass"/>
</xmltask>

nothing happen.

If I delete the xmlns attribute :

<beans>
        <bean class="it.pitagora.myClass" id="router"/>
</beans>

previous code work fine.

Any idea to risolve this issue?
There's something wrong in my code?

Thanks a lo for you reply

Raffaele Verre


Raffaele Verre
e way Enterprise Business Solutions S.r.l.
c/o Nuova Pitagora s.r.l. - Via Cattaneo 23 - 87100
email: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
tel: 0984 - 899340

Informativa ai sensi del codice della Privacy (D. Lgs. 196 - 
30/06/2003)<blocked::mailto:[EMAIL PROTECTED]>

http://www.pitagora.it/196/signature.html








****** CONFIDENTIALITY NOTICE ******

NOTICE: This e-mail message and all attachments transmitted with it may contain 
legally privileged and confidential information intended solely for the use of 
the addressee. If the reader of this message is not the intended recipient, you 
are hereby notified that any reading, dissemination, distribution, copying, or 
other use of this message or its attachments is strictly prohibited. If you 
have received this message in error, please notify the sender immediately and 
delete this message from your system. Thank you.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to