aus xsl/xml eine html
peter meier
- xml
Hi,
ich habe im Web ein Beispiel gefunden das ich gern meinen beduerfnissen anpassen wuerde:
Nun meine Frage, bei dem Beispiel war bereits eine fertig ausgegebene html dabei, ich moechte aber dass man im browser, eine xml file aufruft und dass dann eine html seite angezeigt wird, also dass die uebersetzung dzn im browser passiert
ein xsl file:
<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" ><xsl:output method="html"/>
<xsl:include href="DisplayProds.xsl"/>
<xsl:template match="/">
<!--Create a variable which holds the names of the xml documents we are combining -->
<xsl:variable name="doc.refs.1">
<xsl:for-each select="ProductFiles/file">
<doc><xsl:value-of select="@href"/></doc>
</xsl:for-each>
</xsl:variable>
<!-- Iterate through the variable and display access xml document using the document() object.
Note: We are using the MSXML implementation of the node-set function to access the contents as a nodeset. -->
<xsl:for-each select="msxsl:node-set($doc.refs.1)//doc" >
<!-- Display product information using our DisplayProducts.xsl template -->
<xsl:call-template name="DisplayProds" >
<xsl:with-param name="ProductNodes" select="document(.)"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
danke hat sich erledigt!