The namespace element should be:

<namespace prefix="m0" name="uri"/>

See: http://www.w3.org/TR/REC-xml-names/. IMO is better to simply use two
attributes rather than text content of the element as both values are
straight strings.

Sanjiva.

On Tue, Mar 1, 2011 at 4:21 PM, Udayanga Wickramasinghe
<[email protected]>wrote:

> Hi devs,
> Currently synapse expressions (expression="xpath" OR value={xpath} ) with
> xpath needs to have namespaces declared within the element. We think it is
> better to include namespaces construct at synapse.xml that any xpath
> construct would be able to refer to .For example we can define ;
> <namespaces>
>          <namespace name="m0">http://org.sample.services</namespace>
>          <namespace name="m1">http://org.sample.services</namespace>
>          .......
>          ....
> </namespaces>
>
> This way any expression can correspond to declared a namespace without
> actually defining them in their local element;
> ie:-
>
> <callout serviceURL="https://api.sample.enp/2.0";>
>       <source xpath="m0:Body/child::*[fn:position()=1]  |
> m1:Body/child::*[fn:position()=1]" />
>       <target key="key" />
>   </callout>
>
> IMO this implementation will greatly improve readability of the
> configuration. WDYT?
>
> Regards,
> Udayanga
>
> --
> *Udayanga Wickramasinghe*
> Software Engineer; WSO2 Inc.; http://wso2.com,
> *email: **[email protected]* <[email protected]>* cell: +94 (77) 983-4365
> blog: **http://udayangawiki.blogspot.com*<http://udayangawiki.blogspot.com/>
> *
> twitter: **http://twitter.com/udayanga_wick*<http://twitter.com/udayanga_wick>
> *
> *
>



-- 
Sanjiva Weerawarana, Ph.D.
Founder, Director & Chief Scientist; Lanka Software Foundation;
http://www.opensource.lk/
Founder, Chairman & CEO; WSO2; http://wso2.com/
Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
Member; Apache Software Foundation; http://www.apache.org/
Member; Sahana Software Foundation; http://www.sahanafoundation.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/

Reply via email to