Discrepancy between BizTalk xpath examples and real world
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Discrepancy between BizTalk xpath examples and real world




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Discrepancy between BizTalk xpath examples and real world  
Xerox


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-11-04 01:26 PM

A minor gripe...

The xpath examples in the BizTalk docs at
http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
z_prog_orch_doho.asp demonstrate how easy and convenient xpath can be when
used in an expression. However, the reality is that it can be a real pain to
use it on messages in an expression shape. Here is a real example that
Darren Jefford posted:

xpath
("/*[local-name()='Order']/*[local-name()='Items']/*[local-name(
)='Item'][1]
")

It needs to be like this else it doesn't work. The examples in the BizTalk
docs would have it like this:

xpath ("/Order/Items/Item[1]")

But it just doesn't reflect the reality. The docs should be honest about
this.







[ Post a follow-up to this message ]



    Re: Discrepancy between BizTalk xpath examples and real world  
Xerox


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-12-04 01:26 PM

In response to my own posting, It would be nice for BizTalk to introduce an
"ignore namespace" parameter to the xpath function so that the expressions
can be greatly simplified. Alternatively, introduce xpath 2.0 where I see
the syntax "*:Order" can be used which would select Order from any namespace
including the default.

"Xerox" <info@thinkscape.com> wrote in message
news:#A0KJL33EHA.2608@TK2MSFTNGP10.phx.gbl...
> A minor gripe...
>
> The xpath examples in the BizTalk docs at
>
http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
> z_prog_orch_doho.asp demonstrate how easy and convenient xpath can be when
> used in an expression. However, the reality is that it can be a real pain
to
> use it on messages in an expression shape. Here is a real example that
> Darren Jefford posted:
>
> xpath
>
("/*[local-name()='Order']/*[local-name()='Items']/*[local-name()='Item'][1]

> ")
>
> It needs to be like this else it doesn't work. The examples in the BizTalk
> docs would have it like this:
>
> xpath ("/Order/Items/Item[1]")
>
> But it just doesn't reflect the reality. The docs should be honest about
> this.
>
>







[ Post a follow-up to this message ]



    Re: Discrepancy between BizTalk xpath examples and real world  
Hugo Rodger-Brown


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-13-04 08:26 AM

Xerox - if you're using xpath on a messages whose schema you have defined in
BizTalk (i.e. not using the xs:anyType datatype as dicussed in another
post), you can get the BizTalk-friendly xpath by selecting the node in the
schema designer, and looking at the properties window.

(I agree, however, than when you first come to it then xpath syntax is very
complex.)

Hugo

"Xerox" <info@thinkscape.com> wrote in message
news:%23A0KJL33EHA.2608@TK2MSFTNGP10.phx.gbl...
> A minor gripe...
>
> The xpath examples in the BizTalk docs at
>
http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
> z_prog_orch_doho.asp demonstrate how easy and convenient xpath can be when
> used in an expression. However, the reality is that it can be a real pain
to
> use it on messages in an expression shape. Here is a real example that
> Darren Jefford posted:
>
> xpath
>
("/*[local-name()='Order']/*[local-name()='Items']/*[local-name()='Item'][1]

> ")
>
> It needs to be like this else it doesn't work. The examples in the BizTalk
> docs would have it like this:
>
> xpath ("/Order/Items/Item[1]")
>
> But it just doesn't reflect the reality. The docs should be honest about
> this.
>
>







[ Post a follow-up to this message ]



    Re: Discrepancy between BizTalk xpath examples and real world  
Xerox


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-13-04 01:28 PM

Thats a great tip. Hadn't thought of looking at the properties for the node
path! Its just a shame that something that has such natural language syntax
as xpath is greatly complicated by all the local-name stuff. It'll be once
in a blue moon that there will be name clashes in a schema that need to be
resolved through a namespace prefix - thereby justifying the local-name
syntax. In all 99% other cases, local-name obfuscates the intent. If only
the xpath function accepted a boolean parameter to presume all node access
was local-name then this obfuscation can be avoided.

Oops - got on my soap box again!

"Hugo Rodger-Brown" <hugo@coldhams.com> wrote in message
news:eTlmjRP4EHA.3908@TK2MSFTNGP12.phx.gbl...
> Xerox - if you're using xpath on a messages whose schema you have defined
in
> BizTalk (i.e. not using the xs:anyType datatype as dicussed in another
> post), you can get the BizTalk-friendly xpath by selecting the node in the
> schema designer, and looking at the properties window.
>
> (I agree, however, than when you first come to it then xpath syntax is
very
> complex.)
>
> Hugo
>
> "Xerox" <info@thinkscape.com> wrote in message
> news:%23A0KJL33EHA.2608@TK2MSFTNGP10.phx.gbl... 
>
http://msdn.microsoft.com/library/d...-us/sdk/htm/ebi
 
when[vbcol=seagreen] 
pain[vbcol=seagreen]
> to 
>
("/*[local-name()='Order']/*[local-name()='Items']/*[local-name()='Item'][1]
 
BizTalk[vbcol=seagreen] 
>
>







[ Post a follow-up to this message ]



    Re: Discrepancy between BizTalk xpath examples and real world  
HL7 Guy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-31-04 10:48 PM

I haven't found this to be true at all. I have spent many hours tearing my
hair out over a very simple task - pulling data out of a populated HL7 ADT
XML document based on one of BizTalk's own HL7 Accelerator schemas. I have
used the Instance Path given in the XML document's node properties window an
d
gotten the same errors as everyone else.

The documentation for BizTalk is so poor, and the product's workarounds so
overly complex, that MS is shooting itself in the foot, making its best
product in years all but unusable. I would like to recommend BTS2K4, but if
the support and developer's documentation do not improve soon, I'll
discourage everyone I can from considering it!

"Xerox" wrote:

> Thats a great tip. Hadn't thought of looking at the properties for the nod
e
> path! Its just a shame that something that has such natural language synta
x
> as xpath is greatly complicated by all the local-name stuff. It'll be once
> in a blue moon that there will be name clashes in a schema that need to be
> resolved through a namespace prefix - thereby justifying the local-name
> syntax. In all 99% other cases, local-name obfuscates the intent. If only
> the xpath function accepted a boolean parameter to presume all node access
> was local-name then this obfuscation can be avoided.
>
> Oops - got on my soap box again!
>
> "Hugo Rodger-Brown" <hugo@coldhams.com> wrote in message
> news:eTlmjRP4EHA.3908@TK2MSFTNGP12.phx.gbl... 
> in 
> very 
> [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/ebi[/ur
l] 
> when 
> pain 
> ("/*[local-name()='Order']/*[local-name()='Items']/*[local-nam
e()='Item'][1] 
> BizTalk 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:05 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register