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

Combining XML and XSL in one file

Subject: Combining XML and XSL in one file
From: Cedric Fontaine <cfontaine@xxxxxxxxxxxx>
Date: Wed, 19 Mar 2003 09:31:06 -0500
xml xsl in one file
Hello !

I've read the FAQ about merging XML and XLS in one file and I've done
things it recommends...

But it seems that it doesn't work right for me. When I merge my XML
and XSL files, the stylesheet for item is not applied... I'm just
testing my file on IE 6... Maybe there's a problem with it ?

Here is my file :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="#stylesheet"?>
<!DOCTYPE d3 [
        <!ATTLIST xsl:stylesheet id ID #REQUIRED>
        <!ELEMENT d3 (item*)>
        <!ELEMENT item (Numer_Devis, Code_Clien, Libelle_Client, Date_devis, Observations, Total_HT)>
        <!ELEMENT Numer_Devis (#PCDATA)>
        <!ELEMENT Code_Clien (#PCDATA)>
        <!ELEMENT Libelle_Client (#PCDATA)>
        <!ELEMENT Date_devis (#PCDATA)>
        <!ELEMENT Observations (#PCDATA)>
        <!ELEMENT Total_HT (#PCDATA)>
]>
<d3>
<xsl:stylesheet id="stylesheet" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict">
<xsl:output method="html" media-type="text/html; charset=ISO-8859-1"/>
        <xsl:template match="/">
                <html>
                        <body>
                                <table width="100%">
                                        <tr>
                                                <th>Devis</th><th>Code client</th><th>Libelle</th><th>Date</th><th>Observations</th><th>Total</th>
                                        </tr>
                                        <tbody>
                                                <xsl:apply-templates/>
                                        </tbody>
                                </table>
                        </body>
                </html>
        </xsl:template>
        <xsl:template match="item">
                <tr>
                        <td><xsl:value-of select="Numer_Devis"/></td>
                        <td><xsl:value-of select="Code_Clien"/></td>
                        <td><xsl:value-of select="Libelle_Client"/></td>
                        <td><xsl:value-of select="Date_devis"/></td>
                        <td><xsl:value-of select="Observations"/></td>
                        <td><xsl:value-of select="Total_HT"/></td>
                </tr>
        </xsl:template>
        <xsl:template match="xsl:stylesheet" />
</xsl:stylesheet>
        <item>
                <Numer_Devis>2</Numer_Devis>
                <Code_Clien>117</Code_Clien>
                <Libelle_Client>Toto</Libelle_Client>
                <Date_devis>ME17MI2000</Date_devis>
                <Observations>Module de comptabilit&#233;</Observations>
                <Total_HT>3.110</Total_HT>
        </item>
        <item>
                <Numer_Devis>15</Numer_Devis>
                <Code_Clien>125</Code_Clien>
                <Libelle_Client>Tata</Libelle_Client>
                <Date_devis>LU17FE2003</Date_devis>
                <Observations>R&#233;f&#233;rencement</Observations>
                <Total_HT>1.950</Total_HT>
        </item>
</d3>
  
Thanks
-- 
Cedric - mailto:cfontaine@xxxxxxxxxxxx
(DH/DSS)PGP-key Server ID: 0xBDD6E604


 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.