I am working on a simple project which should allow me to create html input controls with data
defined in an xml file through xslt.
This is my xm data..
="1.0"="ISO-8859-1"
="text/xsl"="robust_xsl.xsl"
<template>
<dividers>
<divider><name> metadata </name></divider>
<divider><name> themes </name></divider>
<divider><name> pages </name></divider>
<divider><name> plugins </name></divider>
</dividers>
<metadata>
<metaName object="entry" name="name" type="text" id="txtName" value=""></metaName>
<metaDescription object="entry" name="description" type="textarea" id="txtDescription" value=""></metaDescription>
<metaVersion object="entry" name="version" type="text" id="txtName" value="" otherAttributes="style=width:20px;"></metaVersion>
</metadata>
<themes>
<theme> </theme>
</themes>
</template>
and the xslt for this code is
...............................
="1.0"="ISO-8859-1"
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="template">
<html>
<body>
<h2>Template Information Collection form </h2>
<xsl:for-each select="dividers/divider">
<fieldset>
<legend> <xsl:value-of select="name"/> </legend>
<xsl:for-each select="name">
</xsl:for-each>
</fieldset>
<hr/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
THE biggest problem i have is i want to navigate through the list of the dividers specified and be able to select each divider entry, search through the xml document for the existence of that node name then process data inside it different...
This is what i mean..
if my divider name = "metadata" i should go to the <metadata> .... </metadata> and collect data between this tag then go to the next divider <themes> ...
I have tried to search the best way to do this but cant get a good approach...have seen using variables but encountered a challenge of modifying the value of that variable.
Please help.
Thanks