Talk About Network

Google





Software > Biz Talk Orchestration > Re: Biztalk Exp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 9 Topic 4209 of 4234
Post > Topic >>

Re: Biztalk Expression Editor Doubt

by =?Utf-8?B?RGFuaWVsIFNhbnRhbmE=?= <DanielSantana@[EMAIL PROTECTED] Oct 29, 2008 at 12:09 PM

Non chance Hashname.... The same string.Empty result....

"Hashname" wrote:

> On Oct 29, 12:05 am, Daniel Santana
> <DanielSant...@[EMAIL PROTECTED]
> wrote:
> > Hi Hashname... Tks for your reply...
> >
> > I've removed the ID element (unnecessary)....
> >
> > So... the xml and schema have the following format:
> >
> > XML:
> >
> > <ns0:root xmlns:ns0="http://Gol.CEC.EAISchemas.CECRequestSchema">
> >  <systems>
> >     <system>SQL</system>
> >     <system>Oracle</system>
> >  </system>
> > <ns0:root>
> >
> > XSD Schema:
> >
> > <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> > xmlns="http://Gol.CEC.EAISchemas.CECRequestSchema"
> > targetNamespace="http://Gol.CEC.EAISchemas.CECRequestSchema"
> > xmlns:xs="http://www.w3.org/2001/XMLSchema">
> >   <xs:element name="root">
> >     <xs:annotation/>
> >     <xs:complexType>
> >       <xs:sequence>
> >         <xs:element name="systems">
> >           <xs:complexType>
> >             <xs:sequence minOccurs="0" maxOccurs="unbounded">
> >               <xs:element maxOccurs="unbounded" name="system"/>
> >             </xs:sequence>
> >           </xs:complexType>
> >         </xs:element>
> >       </xs:sequence>
> >     </xs:complexType>
> >   </xs:element>
> >
> > But even so the problem keeps killing me....
> >
> > This XPath function works fine:
> >
> > ElementCount = (System.Int32)xpath( CECRequestMessage,
> > "count(/*[local-name()='root' and
> >
namespace-uri()='http://Gol.CEC.EAISchemas.CECRequestSchema']/*[local-name()='systems']/*[local-name()='system'])");
> >
> > The ElementCount variable, for that example will have the value "2".
> >
> > But the 2nd one gives me the string.Empty problem:
> >
> > SystemID = xpath(CECRequestMessage, "string(/*[local-name()='root' and
> >
namespace-uri()='http://Gol.CEC.EAISchemas.CECRequestSchema']/*[local-name()='systems']/[local-name()='system'][index]/text()");
> >
> > The most curious part:
> >
> > This returns the only the first item:
> >
> > System = xpath(CECRequestMessage, "string(/*[local-name()='root' and
> >
namespace-uri()='http://Gol.CEC.EAISchemas.CECRequestSchema']/*[local-name()='systems']/*[local-name()='system'])");
> >
> > And this... all the systems:
> >
> > System = xpath(CECRequestMessage, "string(/*[local-name()='root' and
> >
namespace-uri()='http://Gol.CEC.EAISchemas.CECRequestSchema']/*[local-name()='systems'])");
> >
> > I've tried many different ways... Also With and without the "/text()"
part
> > after the system tag...
> >
> > Any idea ?
> >
> > Tks again
> >
> > Kind regards!
> >
> > "Hashname" wrote:
> > > On Oct 27, 3:55 pm, Daniel Santana
> > > <DanielSant...@[EMAIL PROTECTED]
> wrote:
> > > > Helo guys!
> >
> > > > I'm facing some problems within my orchestration. Here is the
point:
> >
> > > > I got a XML like this:
> >
> > > > <systems>
> > > >    <system>
> > > >       <ID>SQL</ID>
> > > >    </system>
> > > >    <system>
> > > >       <ID>Oracle</ID>
> > > >    </system>
> > > > </system>
> >
> > > > My schema is something like this:
> >
> > > > <xs:element name="systems">
> > > >    <xs:complexType>
> > > >       <xs:sequence>
> > > >          <xs:element maxOccurs="unbounded" name="system">
> > > >             <xs:complexType>
> > > >                <xs:sequence>
> > > >                   <xs:element name="ID" type="xs:string" />
> > > >                </xs:sequence>
> > > >            </xs:complexType>
> > > >         </xs:element>
> > > >      </xs:sequence>
> > > >   </xs:complexType>
> > > >   </xs:element>
> >
> > > > The problem is... I'm using two XPath queries...
> >
> > > > One goes just fine:
> >
> > > > ElementCount = (System.Int32)xpath( RequestMessage,
> > > > "count(/*[local-name()='sistemas'  and
> > > >
namespace-uri()='http://Gol.CEC.EAISchemas.RequestSchema']/*[local-name()='sistema'])");
> >
> > > > But the second XPath is killing me....
> >
> > > > SystemID = xpath(RequestMessage, "string(/*[local-name()='systems'
and
> > > >
namespace-uri()='http://Gol.CEC.EAISchemas.CECRequestSchema']/system)");
> >
> > > > The result is all the Sytem items text....
> >
> > > > I've tried to use "system[index]" but no success... the result is
> > > > string.Empty.
> >
> > > > Any ideas of what I'm doing wrong?
> >
> > > Hi
> > > I'm assuming that you read the value in the ID node.
> > > For e.g. if you want to read the value in the second Id node you can
> > > use this xpath:
> > > string(/systems/system[2]/ID)
> 
> try the xpath given below to read the value in the second system node
> string(/*[local-name()='root' and namespace-uri()='http://
> Gol.CEC.EAISchemas.CECRequestSchema']/*[local-name()='systems']/
> *[local-name()='system'][2])
> 
> And as for the last 2 xpaths that u were trying out, that's the
> expected behavior.
> 
>
 




 9 Posts in Topic:
Biztalk Expression Editor Doubt
=?Utf-8?B?RGFuaWVsIFNhbnR  2008-10-27 12:55:03 
Re: Biztalk Expression Editor Doubt
Hashname <praseeth@[EM  2008-10-28 19:26:21 
Re: Biztalk Expression Editor Doubt
=?Utf-8?B?RGFuaWVsIFNhbnR  2008-10-28 21:05:00 
Re: Biztalk Expression Editor Doubt
Dan Rosanova <dnova7@[  2008-10-29 09:55:15 
Re: Biztalk Expression Editor Doubt
Hashname <praseeth@[EM  2008-10-29 10:37:08 
Re: Biztalk Expression Editor Doubt
=?Utf-8?B?RGFuaWVsIFNhbnR  2008-10-29 12:09:01 
Re: Biztalk Expression Editor Doubt
Dan Rosanova <dnova7@[  2008-10-29 12:25:18 
Re: Biztalk Expression Editor Doubt
=?Utf-8?B?RGFuaWVsIFNhbnR  2008-10-29 13:38:10 
Re: Biztalk Expression Editor Doubt
Dan Rosanova <dnova7@[  2008-10-29 16:25:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Thu Jan 8 17:59:30 PST 2009.