xsl-list
[Top] [All Lists]

Namespace issue, possibly FAQ

2003-02-25 12:36:30
Hi all,
I have an XML document which I am trying to transform (and don't we all).

The document begins with the root:
<?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";>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
(This is an excel spreadsheet saved as XML, so I omitted certain parts rom
in between the root and Styles elements).

I have the following stylesheet root in my XSLT file --
<?xml version="1.0"?>
<xsl:stylesheet 
 xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
 version="1.0"


I can get the correct elements with tags like:
        <xsl:template match="/">
                <xsl:apply-templates select="ss:Workbook"/>
        </xsl:template>

But I can't figure out a way to get the "ss:" out from in front of basically
every I am trying to touch.

It's a pretty big file, and a pretty complicated transform, and it only
makes it more complicated with the "ss:".  So the question, I guess, is how
can I avoid putting that prefix in front of all of my elements?


------------------------------
Michael H. Semcheski
Developer, Livewire Media


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



<Prev in Thread] Current Thread [Next in Thread>
  • Namespace issue, possibly FAQ, Michael Semcheski <=