Re: Target Namespace in schemas.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Christof ("Christof")
Date: 06/09/04


Date: Wed, 9 Jun 2004 20:37:18 +0200

When adhering the XML spec and guidance, you should use targetnamespaces.
Why does your XML have to look like this please?

<Invoice>
<Number>Number_0</Number>
<TotalPrice>TotalPrice_0</TotalPrice>
<Invoice>

You can't do anything with this kind of message that you can't do with a
namespaced instance...

If you *really* need it to be this way, you may remove the targetnamespace
and use a custom pipeline. Configure the XML(dis)assembler to use one
specific XML schema then...

Kind regards,
Christof

"froque" <froque.17l3fq@mail.webservertalk.com> wrote in message
news:froque.17l3fq@mail.webservertalk.com...
>
> I have a problem relating target namespaces in the schemas.
>
> first :
>
>
> If I set a target namespace in the schema the resulting xml will look
> like this for example:
>
> -------------------------------------------------
> <ns0:Invoice xmlns:ns0="http://HelloWorld.InvoiceSchema">
> <Number>Number_0</Number>
> <TotalPrice>TotalPrice_0</TotalPrice>
> </ns0:Invoice>
> -------------------------------------------------
>
> and I need to be like this:
>
> -------------------------------------------------
> <Invoice>
> <Number>Number_0</Number>
> <TotalPrice>TotalPrice_0</TotalPrice>
> <Invoice>
> -------------------------------------------------
>
> If I leave empty the target namespace for the schema, Then I get the
> msg as I want, but unfortunatelly I have to deploy in the same server
> another schema with the same root name (Invoice) and then I will get an
> error.
>
> My questions is.
>
> If I have to specify the target namespace, how to obtain the msg in the
> way I need?
>
>
>
> --
> froque
> ------------------------------------------------------------------------
> Posted via http://www.webservertalk.com
> ------------------------------------------------------------------------
> View this thread: http://www.webservertalk.com/message254468.html
>



Relevant Pages

  • Re: Not Importing with xmlns in XML data file
    ... the XML documents are qualified with namespace ... If you want your XML instance to validate against your schema without ... declared elements must be qualified with the target namespace. ...
    (microsoft.public.sqlserver.xml)
  • Re: Target Namespace in schemas.
    ... Christof is correct, by removing the target namespace, you're removing one ... of the two names we use to identify a schema. ... >>When adhering the XML spec and guidance, ...
    (microsoft.public.biztalk.general)
  • Re: Create Multiple Nodes
    ... I am using different schema, but to make things simple I explained my ... can take same schema as source and target with different namesapce). ... input instance message will have multiple books but I couldn't generate ... This isn't well-formed XML. ...
    (microsoft.public.biztalk.general)
  • Re: Interchange pipeline failure
    ... It will parse the flat file and it is also an Envelope/Document schema. ... pipeline you can just pass the Xml and use the Xml Disassembler in the ... But the target namespace of the schema MUST match the ...
    (microsoft.public.biztalk.general)
  • Re: Making the receive location work with MSMQT and MSMQ on the same machine
    ... > I have two problems exactly speaking ... XML Schema only allows you ... target namespace does not make a lot of sense. ...
    (microsoft.public.biztalk.general)