From: Erwan Dion (erwandion@yahoo.fr)
Date: 06/02/2003 - 09:55
Bonjour,
J'ai un problème dans une transformation d'un XML en HTML via un XSL.
Si je lance le XML sous Internet Explorer, cela fonctionne parfaitement.
Par contre, si j'utilise le parser microsoft MSXML4 intégré dans un projet en c++, le fichier HTML résultant est vide...
Voila le XML :
<?xml version="1.0"?>
<ecoSpold xsi:schemaLocation="http://www.EcoInvent.org/EcoSpold01Impact ..\EcoSpold01ImpactDataset.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.EcoInvent.org/EcoSpold01Impact">
<dataset validCompanyCodes="CompanyCodes.xml" validRegionalCodes="RegionalCodes.xml" validCategories="Categories.xml" validUnits="Units.xml" number="1" generator="EcoInvent Excel2EcoSpold 1.0.4" timestamp="2002-07-31T10:43:08" internalSchemaVersion="1.0">
<metaInformation>
<processInformation>
<referenceFunction datasetRelatesToProduct="false" name="climate change" localName="Klimawandel" infrastructureProcess="false" amount="1" unit="points" category="eco-indicator 99, (H,A)" subCategory="human health" localCategory="Eco-indicator 99, (H,A)" localSubCategory="Menschliche Gesundheit" infrastructureIncluded="false">
<synonym>EI'99, Treibhauseffekt</synonym>
</referenceFunction>
<geography location="RER" text="Damage factors valid for Europe"></geography>
<timePeriod dataValidForEntirePeriod="true">
<startYear>1996</startYear>
<endYear>2000</endYear>
</timePeriod>
<dataSetInformation timestamp="2002-07-31T10:43:08" type="4" impactAssessmentResult="false" version="1.0" internalVersion="1.0" energyValues="0" languageCode="en" localLanguageCode="de"></dataSetInformation>
</processInformation>
<modellingAndValidation>
<source number="3" sourceType="3" firstAuthor="Frischknecht R." additionalAuthors="Althaus H.J., Dones R., Heck T., Hischier R., Jungbluth N., Nemecek T., Primas A., Rebitzer G., Spielmann M." year="2003" title="Implementation of Life Cycle Impact Assessment Methods in the ECOINVENT 2000 Database, Version 1.0" placeOfPublications="Dübendorf" text="available on CD-ROM"></source>
</modellingAndValidation>
<administrativeInformation>
<dataEntryBy person="26" qualityNetwork="1"></dataEntryBy>
<dataGeneratorAndPublication person="26" dataPublishedIn="2" referenceToPublishedSource="3" copyright="true" accessRestrictedTo="0"></dataGeneratorAndPublication>
<person number="26" name="Michael Spielmann" address="ETH-Zentrum/HAD, 8092 Zürich" telephone="+41 1 632 49 83" telefax="+41 1 632 10 29" email="spielmann@uns.umnw.ethz.ch" companyCode="ETH-UNS" countryCode="CH"></person>
</administrativeInformation>
</metaInformation>
<flowData>
<exchange number="1" category="air" subCategory="low population density" infrastructureProcess="false" name="Methane, fossil" location="" unit="kg" meanValue="0.05" uncertaintyType="0"></exchange>
<exchange number="2" category="air" subCategory="low population density" infrastructureProcess="false" name="Carbon monoxide, fossil" location="" unit="kg" meanValue="0.3" uncertaintyType="0"></exchange>
<exchange number="3" category="air" subCategory="low population density" infrastructureProcess="false" name="Carbon dioxide, fossil" location="" unit="kg" meanValue="0.002" uncertaintyType="0"></exchange>
<exchange number="4" category="air" subCategory="unspecified" infrastructureProcess="false" name="Carbon dioxide, fossil" location="" unit="kg" meanValue="0.002" uncertaintyType="0"></exchange>
</flowData>
</dataset>
</ecoSpold>
et le XSL :
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:es="http://www.EcoInvent.org/EcoSpold01Impact">
<xsl:template match="es:flowData">
<HTML>
<BODY>
<table width="100%">
<tr>
<td class="ttc3">Name</td>
<td class="ttc3" width="120">Mean value</td>
<td class="ttc3" width="50">Unit</td>
</tr>
<xsl:for-each select="es:exchange">
<xsl:sort data-type="text" order="ascending" select="@category"/>
<xsl:sort data-type="text" order="ascending" select="@subCategory"/>
<xsl:sort data-type="text" order="ascending" select="@name"/>
<xsl:variable name="prevCategory">
</xsl:variable>
<xsl:variable name="prevSubCategory">
</xsl:variable>
<xsl:if test="(@category != '') and ((position() = 1) or (@category != $prevCategory) or (@subCategory != $prevSubCategory))">
<tr>
<td class="ttl4" colspan="8">
<xsl:value-of select="@category"/><xsl:if test="@subCategory">/<xsl:value-of select="@subCategory"/></xsl:if>
</td>
</tr>
</xsl:if>
<tr>
<td class="ttl4"><xsl:value-of select="@name"/></td>
<td class="ttr4"><xsl:value-of select="@meanValue"/></td>
<td class="ttl4"><xsl:value-of select="../../es:metaInformation/es:processInformation/es:referenceFunction/@unit"/>/<xsl:value-of select="@unit"/></td>
</tr>
</xsl:for-each>
</table>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
Je sais que mo mail est long, mais je suis paumé. Si quelqu'un pouvait m'aider. Je me demande si cela ne vient pas du double namespace...
Merci d'avance,
Erwan
---------------------------------
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
--
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:06 UTC
webmaster@xmlfr.org
|