Click here to Skip to main content
15,923,083 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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..

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="robust_xsl.xsl"?>
		<divider><name> metadata </name></divider>
		<divider><name> themes </name></divider>
		<divider><name> pages </name></divider>
		<divider><name> plugins </name></divider>
		<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>

		<theme> </theme>

and the xslt for this code is
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="template">
	<h2>Template Information Collection form </h2>
		<xsl:for-each select="dividers/divider">
				<legend> <xsl:value-of select="name"/> </legend>
				<xsl:for-each select="name">


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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900