salve,
ho due file xml contenenti informazioni diverse fra loro, ed ho uno stlesheet xsl che ne dovrebbe presentare i dati in una pagina html.
il problema è che non riesco visualizzare i dati di entrambi nella pagina, ma solo di un file per volta
i due xml sono del tipo:
ecodice:<?xml version='1.0' encoding='ISO-8859-1' ?> <?xml-stylesheet type="text/xsl" href="tabella.xsl"?> <Mpeg7><DescriptionUnit><Descriptor><Region><RegionNumber>255</RegionNumber> <GlobalCurvature>42 8 </GlobalCurvature> <PrototypeCurvature>3 9 </PrototypeCurvature> <HighestPeakY>43</HighestPeakY> <Peak peakX = "20" peakY = "3"/> <Peak peakX = "0" peakY = "4"/> <Peak peakX = "13" peakY = "4"/> <Peak peakX = "10" peakY = "6"/> <Peak peakX = "16" peakY = "5"/> <Peak peakX = "52" peakY = "6"/> <Peak peakX = "51" peakY = "5"/> </Region> </Descriptor> </DescriptionUnit> </Mpeg7>
mentre lo stylesheet è del tipo:codice:<?xml version='1.0' encoding='ISO-8859-1' ?> <?xml-stylesheet type="text/xsl" href="tabella.xsl"?> <meta><Concept>Contour Shape</Concept> <Instance>coda_razza</Instance> <Descriptor>bastone</Descriptor> </meta>
spero che qualcuno possa aiutarmi.codice:<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title><xsl:value-of select="meta/Instance"/></title> <style type="text/css"> <xsl:comment> </xsl:comment> </style> </head> <body> <h1 align="center"><u>Tipo di Descrittore: <xsl:value-of select="meta/Concept"/></u></h1> <h1 align="center"><u>Nome Istanza: <xsl:value-of select="meta/Instance"/></u></h1> <h3 align="center"><u>Descrittore Istanza: <xsl:value-of select="meta/Descriptor"/></u></h3> <td width="150" align="center"> <img align="right"> <xsl:attribute name="src"> <xsl:value-of select="Mpeg7/DescriptionUnit/Descriptor/Region/img"/> </xsl:attribute> </img> </td> <table width="419" height="180" border="3" align="center" bordercolor="#FF0000" bgcolor="#FFFFFF"> <caption> Tipo di descrittore: <xsl:value-of select="meta/Concept"/> </caption> <tr> <th width="259" scope="row">Region Number</th> <td width="144"> <div align="center"> <xsl:value-of select="Mpeg7/DescriptionUnit/Descriptor/Region/RegionNumber"/> </div> </td> </tr> <tr> <th scope="row">Global Curvature Circularity/Global Curvature Eccentricity</th> <td> <div align="center"> <xsl:value-of select="Mpeg7/DescriptionUnit/Descriptor/Region/GlobalCurvature"/> </div> </td> </tr> <tr> <th scope="row">Prototype Curvature Circularity/Global Curvature Eccentricity</th> <td> <div align="center"> <xsl:value-of select="Mpeg7/DescriptionUnit/Descriptor/Region/PrototypeCurvature"/> </div> </td> </tr> <tr> <th scope="row">Highest Peak Y</th> <td> <div align="center"> <xsl:value-of select="Mpeg7/DescriptionUnit/Descriptor/Region/HighestPeakY"/> </div> </td> </tr> </table> <table width="200" height="166" border="3" align="center" bordercolor="#FF0000"> <tr> <th height="31" scope="col">Peak X</th> <th scope="col">Peak Y</th> </tr> <xsl:for-each select="Mpeg7/DescriptionUnit/Descriptor/Region/Peak"> <tr> <td> <div align="center"> <xsl:value-of select="@peakX"/> </div> </td> <td> <div align="center"> <xsl:value-of select="@peakY"/> </div> </td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet>
grazie

Rispondi quotando