From: BAIE Patrick FTRD/DMI/SOP (patrick.baie@francetelecom.com)
Date: 22/03/2004 - 11:03
J'ai testé et cela ne fonctionne toujours pas...Voici le contenu du fichier XSL :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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">
<xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes" />
<xsl:template match="/">
<xsl:for-each select="/Workbook/ExcelWorkbook">
<Etude>
<Routages>
<Demandes>
<ParcClient>
</ParcClient>
</Demandes>
</Routages>
</Etude>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Et voici le fichier 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">
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>11460</WindowHeight>
<WindowWidth>16815</WindowWidth>
<WindowTopX>1395</WindowTopX>
<WindowTopY>-135</WindowTopY>
<TabRatio>938</TabRatio>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
</Workbook>
Pour tester je voudrais juste que le XSL trouve bien le tag ExcelWorkbook et génère le tag Etude, mais le XSL ne trouve rien. Il ne comprend pas la commande xpath : <xsl:for-each select="/Workbook/ExcelWorkbook">
Comment dois je utiliser le namespace xmlns:x?
Merci
-----Message d'origine-----
De : xml-tech-bounce@xmlfr.org [mailto:xml-tech-bounce@xmlfr.org] De la part de Pierre Attar
Envoyé : lundi 22 mars 2004 11:31
À : xml-tech@xmlfr.org
Objet : [xml-tech] Re: XML Namespaces
Tous les namespace doivent être déclarés dans l'xslt et en plus, sans
pouvoir utiliser d'espace de noms par défaut.
<xsl:stylesheet ... xmlns:ss="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">
Ensuite, on peut faire des
<xsl:template match="ss:cell" >
Si la cell existe chez microsoft spreadsheet.
Pierre
At 10:21 22/03/2004, you wrote:
>Bonjour,
>
>Résumé du probleme :
>j'utilise XMLSpy pour exécuter un XSLT sur un fichier XML qui a été
>généré
>en sortie de EXCEL (enregistrer sous : au format XML).
>Ce fichier XML contient des Namespaces de type :
><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">
>
>En exécutant mon XSL de base qui ne fait pratiquement rien (car je suis
>en
>phase de test) cela ne renvoi aucun résultat mais je n'ai aucune erreur.
>Lorsque j'enleve les XML Namespaces, cela fonctionne tres bien.
>Pourtant à aucun moment XMLSpy ne me dit que mon XML n'est pas valide.
>
>Je suppose que je dois déclarer ces Namespaces et ces schémas mais ou
>les
>trouver?
>
>Avez vous une idée?
>
>Merci par avance pour vos réponses.
>
>Cordialement.
>
>Patrick Baie
>
>--
>Devenez redacteur <XML>fr et contribuez au developpement du xml
>francophone (http://xmlfr.org/infos/redacteurs/) !
>
>Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
>
>Cette liste est a votre disposition pour discuter en francais de tout
>sujet technique lie a XML.
>
>Pour resilier votre abonnement, envoyez un message contenant la
>commande "unsubscribe" a xml-tech-request@xmlfr.org
>(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Pierre Attar (mailto:pat@tireme.fr)
Consultant en informatique documentaire XML
Consultant in Structured Document engineering
Projet "Mutualiser l'effort de montée en compétences sur XML" http://www.mutu-xml.org/index.html
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:05 UTC
webmaster@xmlfr.org
|