Ciao a tutti , ho un bel problemino,per favore aiutatemi.
Ho un file xml scritto con tag rdf ve ne riporto di seguito solo alcune righe
<?xml version="1.0" encoding="UTF-8" ?>
<?rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'><?xml-stylesheet type="text/xsl" href="./xslcarlo.xsl"?>
- <rdf:RDF xmlns:nl="http://mais.uniroma3.it/nl.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:kb="http://protege.stanford.edu/kb#">
- <rdf:Description rdf:about="http://protege.stanford.edu/kb#Gname">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class" />
<rdfs:label>Gname</rdfs:label>
<rdfs:subClassOf rdf:resource="http://protege.stanford.edu/kb#Field" />
<kb:type rdf:resource="http://mais.uniroma3.it/nl.owl#Link" />
<kb:innerSize rdf:datatype="http://www.w3.org/2001/XMLSchema#int">200</kb:innerSize>
<kb:gname>Cronaca</kb:gname>
</rdf:Description>
- <rdf:Description rdf:about="http://protege.stanford.edu/kb#News2ToJournal2">
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property" />
<rdfs:subPropertyOf rdf:resource="http://protege.stanford.edu/kb#associatedTo" />
<rdfs:domain rdf:resource="http://protege.stanford.edu/kb#News2" />
<rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Journal2" />
</rdf:Description>
</rdf:RDF>
Ho scritto un file xsl per applicare un trasformazione che mi generi un file html ma pare che quello che scrivo non venga minimamente considerato.Quando il documento XSLT non definisce nessuna regola, in output vengono inviati i dati contenuti negli elementi del documento XML con a capo un prologo XML e questo è quello che praticamente succede a me.
Di seguito vi riporto il file xsl
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Prologo XML
-->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdf="http://www.w3.org/1999/XSL/Transform" xmlns:kb="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <!-- Applica questo template al nodo radice indicato dal carattere /
-->
- <html>
- <xsl:apply-templates>
- <!-- Richiama e applica gli altri templates
-->
</xsl:apply-templates>
</html>
</xsl:template>
- <xsl:template match="rdf:Description">
<xsl:value-of select="kb:gname" />
<br />
</xsl:template>
</xsl:stylesheet>
In base a questo xsl, il file html dovrebbe contenere lsolo la parola Cronaca
Mi vorrei tanto laureare per favore aiutatemi non riesco a capire cosa c'è di sbagliato nel file xsl.
Grazie