Reputation: 61
Could someone help with this issue ? :
this my xml file called ce.xml
<?xml version="1.0" encoding="windows-1252" ?>
<?xml-stylesheet type="text/xsl" href="ce.xslt"?>
<TABLE>
<CE>
<Variable> STUDYID </Variable>
<Label> Study Identifier </Label>
<length> 200 </length>
<Type> Char </Type>
</CE>
<CE>
<Variable> DOMAIN </Variable>
<Label> Domain Abbreviation </Label>
<length> 200 </length>
<Type> Char </Type>
</CE>
<TABLE>
I would to render in html only the values of the variable "Variable",which are domain and studyid. So I used the following xslt transformation :
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head>
<title>Get all Variables</title>
</head>
<body>
<xsl:for-each select="/TABLE/CE"/>
<xsl:value-of select="Variable"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I don't understand, it should work as it is quite a basic query. Note that it failed on all browsers.
Thanks in advance
saskap
Upvotes: 0
Views: 50
Reputation: 117102
<TABLE>
needs to be
</TABLE>
.Instead of :
<xsl:for-each select="/TABLE/CE"/>
you need:
<xsl:for-each select="/TABLE/CE">
Upvotes: 2