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

Different outputs when i change namespace in an xml

Subject: Different outputs when i change namespace in an xml
From: "Joeri Belis" <joeri.belis@xxxxxxxxxxxx>
Date: Tue, 19 Mar 2002 15:14:40 +0100
different outputs
Hi,

Here is a stripped down version of excel xml. When i use the my test xsl on
the xml file, i only get the values
of the 2 data elemens of the cell ( 100 and "test" ). But when i remove
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
from the Workbook element in the input xml, i get a completely other output.
Why is this?

Joeri

input xml:

<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:o="urn:schemas-microsoft-com:office:office"
          xmlns:x="urn:schemas-microsoft-com:office:excel"
          xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:html="http://www.w3.org/TR/REC-html40">

 <Worksheet ss:Name="Blad1">
  <Table ss:ExpandedColumnCount="6" ss:ExpandedRowCount="2"
x:FullColumns="1" x:FullRows="1">
   <Row>
    <Cell ss:Index="6">
     <Data ss:Type="Number">100</Data>
     <NamedCell ss:Name="OfferteNr"/>
    </Cell>
   </Row>
   <Row>
    <Cell ss:Index="6" ss:StyleID="s21">
     <Data ss:Type="String">test</Data>
    </Cell>
   </Row>
  </Table>
 </Worksheet>
</Workbook>

test xsl:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml"
            indent="yes"/>

<xsl:template match="Workbook">
  <xsl:copy>
      <xsl:apply-templates select="*"/>
  </xsl:copy>
</xsl:template>

<xsl:template match="*[ancestor::Workbook]">
  <xsl:copy>
    <xsl:apply-templates select="*"/>
  </xsl:copy>
</xsl:template>


</xsl:stylesheet>

output WITH xmlns="urn:schemas-microsoft-com:office:spreadsheet" in input
xml file

<?xml version="1.0" encoding="utf-8"?>





                                        100





                                        test

output WITHOUT xmlns="urn:schemas-microsoft-com:office:spreadsheet" in input
xml file

<?xml version="1.0" encoding="utf-8"?>
<Workbook xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas
-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsh
eet" xmlns:html="http://www.w3.org/TR/REC-html40">
   <Worksheet>
      <Table>
         <Row>
            <Cell>
               <Data/>
               <NamedCell/>
            </Cell>
         </Row>
         <Row>
            <Cell>
               <Data/>
            </Cell>
         </Row>
      </Table>
   </Worksheet>
</Workbook>



 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.