bonjour a tous,
Je n'arrive pas a comprendre mon probleme,je dois parser un doc XML
(rdf),quand j'ai <xsl:template match="/rdf:RDF"> et que je fais un
<xsl:for-each select="node()"><xsl:value-of select="name()"/></xsl:for-each>
j'obtient bien le nom de chaque noeud
fileName,Ontology,Class,Property...etc dans l'ordre du doc ,Mais quand je
remplace "<xsl:for-each select="node()"><xsl:value-of
select="name()"/></xsl:for-each>" par "<xsl:for-each
select="Class"><xsl:value-of select="label"/></xsl:for-each>" , il ne trouve
pas le noeud en question ???
que dois je savoir ou comprendre dans ce cas?
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.daml.org/2001/03/daml+oil#"
xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
xmlns:base="http://www.cs.umd.edu/projects/plus/DAML/onts/base1.0.daml#"
xmlns:doc="http://www.cs.umd.edu/projects/plus/DAML/onts/docmnt1.0.daml#"
xmlns:gen="http://www.cs.umd.edu/projects/plus/DAML/onts/general1.0.daml#">
<fileName>univ1_0_daml</fileName>
<Ontology about="a">
<versionInfo>university-ont, v.1.0</versionInfo>
<comment>An ontology for describing universities and the activities that
occur at them.</comment>
<imports
resource="http://www.cs.umd.edu/projects/plus/DAML/onts/base1.0.daml"/>
<imports
resource="http://www.cs.umd.edu/projects/plus/DAML/onts/docmnt1.0.daml"/>
<imports
resource="http://www.cs.umd.edu/projects/plus/DAML/onts/general1.0.daml"/>
</Ontology>
<Class ID="TeachingAssistant">
<label>university teaching assistant</label>
<subClassOf resource="#Assistant"/>
</Class>
<Property ID="teachingAssistantOf">
<label>is a teaching assistant for</label>
<domain resource="#TeachingAssistant"/>
<range resource="#Course"/>
</Property>
</rdf:RDF>
et ma feuille XSL:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
version="1.0">
<xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes"/>
<xsl:variable name="pageCourante" select="/"/>
<xsl:template match="/rdf:RDF">
<xsl:for-each select="Class">
<xsl:value-of select="label"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
merci à tous ceux qui pourront me donner un petit peu de lumiere.
gilles
--
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)
Received on Mon Apr 28 18:04:08 2003