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

Re: XMLSS XSL question

Subject: Re: XMLSS XSL question
From: "Emmanuil Batsis (Manos)" <mbatsis@xxxxxxxxxxx>
Date: Fri, 05 Sep 2003 13:52:51 +0300
xmlss

Change your stylesheet root element to


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns="urn:schemas-microsoft-com:office:spreadsheet">


The alternative is to change it like

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ms="urn:schemas-microsoft-com:office:spreadsheet">


that is, declare the namespace in your stylesheet and then use it in
XPath expressions like

<xsl:template match="ms:Workbook">

You are currently looking for a null-namespaced element with a local name of Workbook. You cant find it because there isn't any ;-)

hth,

Manos

Madari István wrote:
Hi,

I'm a beginner in XSL, and I have problem.
I'm using xmlspy 5 with its built-in XSLT engine, and I cant apply
templates for an XMLSS document..

few rows from the document:

<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">
        <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
                <Author>Trax</Author>
.
.
.
.
.
</Workbook>

the xsl which I tried:

<?xml version="1.0" encoding="UTF-8"?>
<?xmlspysamplexml C:\Documents and Settings\Trax\Asztal\Munkafüzet1.xml?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
        <xsl:output method="html"/>
        <xsl:template match="/">
                <xsl:apply-templates select="Workbook"/>
        </xsl:template>
        <xsl:template match="Workbook">
                <xsl:value-of select="name()"/>
        </xsl:template>
</xsl:stylesheet>

the debugger cant find the <Workbook>...
what is the problem? the namespace or what?
how can I solve this?

Thanks...



-- Manos Batsis

    _  __    __                    __
   / |/ /__ / /____ __ _ ___ _____/ /_
  /    / -_) __(_-</  ' Y _ `/ __/ __/
 /_/|_/\__/\__/___/_/_/_|_,_/_/  \__/

http://www.netsmart.gr
mbatsis at netsmart dot gr
(+30) 210 33 02 608
(+30) 210 33 02 658
http://forte.netsmart.gr/foaf/manos_foaf.rdf




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.