Bezug nehmend auf das Thema:
http://forum.de.selfhtml.org/archiv/2006/3/t125006/
habe ich es ebenfalls probiert, aus eine xsl Datei eine xml auf zurufen. nur es funktioniert nicht. Was mache ich falsch?
Meine xsl-Datei
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<style type="text/css">
form ul {
margin : 0px;
padding : 0px;
}
form ul li {
margin : 0px;
padding : 0.2em 0px;
list-style-type : none;
}
form ul li#js-region {
display : none;
}
form ul li label {
margin : 0px;
padding : 0px;
width : 6em;
float : left;
}
form ul li select {
margin : 0px;
padding : 0px;
width : 15em;
}
</style>
<script type="text/javascript">
function setRegion() {
if (document.getElementById("land").selectedIndex == 4) {
document.getElementById("js-region").style.display = "block";
}
else {
document.getElementById("js-region").style.display = "none";
document.getElementById("region").selectedIndex = "error";
}
}
</script>
</head>
<body>
<form action="http://localhost/marketing-coop/frontend/tour-search.php" method="post">
<ul>
<li>
<label for="land">País</label>
<select size="3" multiple="multiple" id="land" name="land[]" onchange="setRegion();">
<option value="error">--- Por favor elija ---</option>
<xsl:for-each select="document('http://marketing-coop.trekkingchile.com/tour-search-es.xml')/FormField/TourLand/Land">
<xsl:element name="option">
<xsl:attribute name="value">
<xsl:value-of select="Id"/>
</xsl:attribute>
<xsl:value-of select="Name"/>
</xsl:element>
</xsl:for-each>
</select>
</li>
<li id="js-region">
<label for="region">Regíon</label>
<select size="3" multiple="multiple" id="region[]" name="region">
<option value="error">---</option>
<xsl:for-each select="document('http://marketing-coop.trekkingchile.com/tour-search-es.xml')/FormField/TourRegion/Region">
<xsl:element name="option">
<xsl:attribute name="value">
<xsl:value-of select="Id"/>
</xsl:attribute>
<xsl:value-of select="Name"/>
</xsl:element>
</xsl:for-each>
</select>
</li>
<li>
<label for="category">Categoría</label>
<select size="3" multiple="multiple" id="category[]" name="category">
<option value="error">---</option>
<xsl:for-each select="document('http://marketing-coop.trekkingchile.com/tour-search-es.xml')/FormField/TourCategory/Category">
<xsl:element name="option">
<xsl:attribute name="value">
<xsl:value-of select="Id"/>
</xsl:attribute>
<xsl:value-of select="Name"/>
</xsl:element>
</xsl:for-each>
</select>
</li>
</ul>
<p>
<input name="show" type="submit" value="marcar" />
</p>
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Die würde ich doch ganz normal im Browser aufrufen oder?