Author |
Message
|
mbscott |
Posted: Thu Mar 15, 2012 12:47 pm Post subject: Xmlns:xsi schemalocation issue |
|
|
Novice
Joined: 15 Jul 2011 Posts: 15
|
Hi,
In my flow i am getting below xml with invalid schema locations, i need to correct it and send to wtx map.
<?xml version="1.0" encoding="UTF-8"?>
<ROOT xmlns:xsi="htt//www.w3.org/2001/XMLSchema-instance" xmlns="http://xml-schemas.yyyy.com/esb/request.xsd" xsi:schemaLocation="htt//xml-schemas.yyyy.com/esb/request.xsd request.xsd>
<REQUEST-INFO>
<REQ-NAME>SOURCE</REQ-NAME>
<REQ-CODE>LOCAL</REQ-CODE>
</REQUEST-INFO>
</ROOT>
in Http:// p. missing
In output i need to correct it. i tried below
CALL CopyEntireMessage();
SET OutputRoot.XMLNSC.ns.ROOT.(XMLNSC.Attribute)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNSC.ns.ROOT.(XMLNSC.Attribute)xsi:schemaLocation = 'http://xml-schemas.yyyy.com/esb/request.xsd request.xsd';
xsi:schemaLocation value getting overrided and xmlns:xsi not overriding more over creating one more xsi attribute.
Please help me on this? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 15, 2012 8:05 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
How about using a field reference and changing its fieldvalue?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqsiuser |
Posted: Fri Mar 16, 2012 12:58 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
You are using the default namespace ("xmlns"). There has been valuable input here and here. _________________ Just use REFERENCEs |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Mar 16, 2012 1:36 am Post subject: Re: Xmlns:xsi schemalocation issue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mbscott wrote: |
Code: |
SET OutputRoot.XMLNSC.ns.ROOT.(XMLNSC.Attribute)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'; |
|
Namespace declarations are not attributes. |
|
Back to top |
|
 |
mqsiuser |
Posted: Fri Mar 16, 2012 1:45 am Post subject: Re: Xmlns:xsi schemalocation issue |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
rekarm01 wrote: |
mbscott wrote: |
Code: |
SET OutputRoot.XMLNSC.ns.ROOT.(XMLNSC.Attribute)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'; |
|
Namespace declarations are not attributes. |
looks similar though
Hmmm... could it be, that the W3C and XMLNSC have different views on that ? _________________ Just use REFERENCEs |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 16, 2012 4:55 am Post subject: Re: Xmlns:xsi schemalocation issue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqsiuser wrote: |
looks similar though  |
A car looks similar to a truck (4 wheels, engine, somewhere for the driver to sit) but they're very different things.
mqsiuser wrote: |
Hmmm... could it be, that the W3C and XMLNSC have different views on that ? |
I'm sure kimbert will be along in a moment to clarify this, possibly quite loudly. AFAIK the XMLNSC parser is fully compliant, and that's where there are different constants for namespace declarations & attributes. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 16, 2012 5:06 am Post subject: Re: Xmlns:xsi schemalocation issue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You've lived in America too long. How does one spell 'color' again? |
|
Back to top |
|
 |
mqsiuser |
Posted: Fri Mar 16, 2012 5:13 am Post subject: Re: Xmlns:xsi schemalocation issue |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
Vitor wrote: |
I'm sure kimbert will be along in a moment to clarify this, possibly quite loudly. AFAIK the XMLNSC parser is fully compliant, and that's where there are different constants for namespace declarations & attributes. |
A parser needs to work exactly that way. The standard is also ok.... there is nothing to worry about !
The confusion from the OP (and actually I was also once at that point) just comes from this slight difference in terminology... but a parser is a parser and a w3c standard (recommendation) is a w3c recommendation... nothing to worry, just something to have in mind.
And a user trace + the infocenter will perfectly clarify about this. _________________ Just use REFERENCEs |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 16, 2012 5:50 am Post subject: Re: Xmlns:xsi schemalocation issue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
You've lived in America too long. |
Possibly. I also embrace the influence America has had on worldwide culture and language.
mqjeff wrote: |
How does one spell 'color' again? |
Correctly. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|