09-23-04 02:56 AM
Thanks... that's a great blog but it doesn't really answer my question. in
fact, the question is confirmed by the following example (given by Andrei
Maksimenka) of the XML file participating in the interchange:
<ns0:envelope xmlns:ns0="ns0">
<header>
<firstName>Andrei</firstName>
<lastName>Maksimenka<lastName>
</header>
<documents>
<ns1:document xmlns:ns1="ns1">
<!-- some stuff-->
</ns1:document>
<ns1:document xmlns:ns1="ns1">
<!-- some stuff-->
</ns1:document>
<ns1:document xmlns:ns1="ns1">
<!-- some stuff-->
</ns1:document>
</ns0:envelope>
As you can see, namespaces are explicitly specified. How should i deal w/
the same data but if they come w/ no namespace specification?
<envelope>
<header>
<firstName>Andrei</firstName>
<lastName>Maksimenka<lastName>
</header>
<documents>
<document>
<!-- some stuff-->
</document>
<document>
<!-- some stuff-->
</document>
<document>
<!-- some stuff-->
</document>
</envelope>
thanks in advance!
"XUEZHAI NI" wrote:
> take a look at the link
> http://blogs.msdn.com/scottwoo/arch...2/06/68694.aspx
>
> hope that blog will answer your question.
>
> thanks
>
> Ni
>
> --------------------
> | Thread-Topic: Envelopes and Schemas and Pipelines, Oh My
> | thread-index: AcSgHG2zGnUi0egyTN2zoOrKsLFW2A==
> | X-WBNR-Posting-Host: 68.54.158.86
> | From: "examnotes" <SillyKing@discussions.microsoft.co
m>
> | Subject: Envelopes and Schemas and Pipelines, Oh My
> | Date: Tue, 21 Sep 2004 13:49:03 -0700
> | Lines: 39
> | Message-ID: <A3929353-14C0-437E-B7CB-405193C3DD9B@microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.biztalk.orchestration
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:8261
> | X-Tomcat-NG: microsoft.public.biztalk.orchestration
> |
> | Hi all,
> |
> | after some (painful) envelope/document processing pipeline
> experimentation,
> | i have come to a (possibly erroneous) conclusion that the received XML
> file
> | has to explicitly identify appropriate elements as "having" the
> | document/envelope schema. Is my conclusion correct?
> |
> | When adding the XML disassembler component to my pipeline, i specified
> that
> | the Document schema (for example) is SinglePerson.xsd (target namespace
> | http://tempuri.org/SinglePerson.xsd) and the envelope schema is
> | MultiPerson.xsd (target namespace http://tempuri.org/MultiPerson.xsd).
> The
> | envelope schema has had its envelope property set to Yes and the root
> element
> | identified properly w/ the Body Xpath expression. Furthermore, i've
> imported
> | the SinglePerson schema into the MultiPerson schema and referenced the
> | SinglePerson node.
> |
> | The pipeline only seems to process an incoming XML file if all elements
> in
> | the file explicitly state which namespace they belong to:
> |
> | <ns0:MultiPerson xmlns:ns0="http://tempuri.org/MultiPerson.xsd">
> | <ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
> | <ns1:Name>Full name here</ns1:Name>
> | <ns1:Email>Email address here</ns1:Email>
> | </ns1:SinglePerson>
> | <ns1:SinglePerson xmlns:ns1="http://tempuri.org/SinglePerson.xsd">
> | <ns1:Name>Full name here</ns1:Name>
> | <ns1:Email>Email address here</ns1:Email>
> | </ns1:SinglePerson>
> | </ns0:MultiPerson>
> |
> | Since the actual file that i get from the customer does not contain thos
e
> | namespace declarations, the pipeline is unable to process it and fails w
/
> | errors that state so. This behavior does make sense in terms of my
> | understanding of how the XML disassemlber works. However, perhaps
> someone
> | can help me and tell me either what i've done incorrectly to produce suc
h
> | behavior *or* how i should transform the incoming file to get those
> namespace
> | declarations in there?
> |
> | thanks much!
> |
>
>
[ Post a follow-up to this message ]
|