[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Problem using MSXML

Subject: Problem using MSXML
From: "Kalyan Kumar Mudumbai" <kalyan_tech@xxxxxxxxxxxxxx>
Date: 18 Sep 2002 05:53:19 -0000
msxml xmlns
Hi All,
I posted this earlier, but unfortunately couldn't get any help on it. So, I am reposting it again.
I've a problem while using MSXML3 or MSXML4 as my processor,
which I do not get when I use Saxon or Xalan-J processors. The
following are the input files and the output files. Please can some one explain me why MSXML does create this problem?


Here I am merging 2 xml files using an XSL file
---------------------------
InputFile_1.xml
---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Root xmlns:m="http://www.xyz.com/m">
  <Header>
    <Version>1.0</Version>
  </Header>
  <Message>
    <Type>Response</Type>
    <SubType>CALCULATION</SubType>
    <Calculate>
      <Data>
        <A>
          <Time>
            <B Unit="XY">+21.0</B>
            <C Unit="XY">+5.0</C>
            <D>0</D>
          </Time>
        </A>
      </Data>
    </Calculate>
  </Message>
</Root>
------------------------------------
InputFile_2.xml
------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Root>
    <Message>
      <Calculate>
        <Data>
          <A>
             <Time>
              <BDesc stage="LM">Some Text 1</BDesc>
              <CDesc stage="LM">Some Text 2</CDesc>
              <D>0</D>
            </Time>
          </A>
        </Data>
      </Calculate>
    </Message>
</Root>

----------------------------------
Output.xml using Saxon or Xalan
----------------------------------
  <?xml version="1.0" encoding="UTF-8" ?>
- <Root>
- <Header xmlns:m="http://www.xyz.com/m">
  <Version>1.0</Version>
  </Header>
- <Message>
  <Type xmlns:m="http://www.xyz.com/m">Response</Type>
  <SubType xmlns:m="http://www.xyz.com/m">CALCULATION</SubType>
- <Calculate>
- <Data>
- <A>
- <Time>
  <B xmlns:m="http://www.xyz.com/m" Unit="XY">+21.0</B>
  <C xmlns:m="http://www.xyz.com/m" Unit="XY">+5.0</C>
  <BDesc stage="LM">Some Text 1</BDesc>
  <CDesc stage="LM">Some Text 2</CDesc>
  <D>0</D>
  </Time>
  </A>
  </Data>
  </Calculate>
  </Message>
  </Root>
-----------------------------------------------
Output.xml using MSXML 3 or 4
---------------------------------
<?xml version="1.0" encoding="UTF-16" ?>
- <Root xmlns:m="http://www.xyz.com/m">
- <Header>
  <Version>1.0</Version>
  </Header>
- <Message>
  <Type>Response</Type>
  <SubType>CALCULATION</SubType>
- <Calculate>
- <Data>
- <A>
- <Time>
  <B Unit="XY">+21.0</B>
  <C Unit="XY">+5.0</C>
  <BDesc stage="LM">Some Text 1</BDesc>
  <CDesc stage="LM">Some Text 2</CDesc>
  <D stage="LM">0</D>
  </Time>
  </A>
  </Data>
  </Calculate>
  </Message>
  </Root>
-------------------------------------------

If you can notice, there is a very small difference in the above 2 output files. The element <<D>> has an attribute "stage" in the second output file(using MSXML) where as it doesn't have any attribute and is copied down as expected in the first output file(using Saxon or Xalan). Can someone explain me what could be the reason behind this discrepancy.

Thanks,
Kalyan

P.S:- I have posted the XSLT file used for this transformation in my earlier posting. Thinking that it's length would constrain people from having a look at this mail, I did not repost it again. If you think you need, please let me know, I'd post it.

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.