S
Saravanan
This is my XML file:
<?xml version="1.0" encoding="utf-8" ?>
<Feature>
<Section>Protocol
<Section>Network
</Section>
<Section>HTTP
<Requirements>Header
</Requirements>
<Requirements>Connection
</Requirements>
</Section>
</Section> </Feature>
This is my XSLT file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<BODY>
<br><xsl:for-each select = "Feature">
<xsl:value-of select="Section" />
<xsl:for-each select = "Feature/Section">
<xsl:value-of select="Section" />
<xsl:value-of select="Requirements" />
</xsl:for-each> </br>
</xsl:for-each> </br>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
My XSLT file generates an output that is a stream of text as follows:
Protocol Stack Network Layer TCP TLS/SSL HTTP Request Header Connection
Management Caching Response Code Handling Non-Standard Response Header
Support
But I am trying to get a formatted output similar to the Table of
Contents with indentations that one will find in a text book or
something similar. I am new to XML any input/directions will make my day!
Thanks,
Subash
<?xml version="1.0" encoding="utf-8" ?>
<Feature>
<Section>Protocol
<Section>Network
</Section>
<Section>HTTP
<Requirements>Header
</Requirements>
<Requirements>Connection
</Requirements>
</Section>
</Section> </Feature>
This is my XSLT file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<BODY>
<br><xsl:for-each select = "Feature">
<xsl:value-of select="Section" />
<xsl:for-each select = "Feature/Section">
<xsl:value-of select="Section" />
<xsl:value-of select="Requirements" />
</xsl:for-each> </br>
</xsl:for-each> </br>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
My XSLT file generates an output that is a stream of text as follows:
Protocol Stack Network Layer TCP TLS/SSL HTTP Request Header Connection
Management Caching Response Code Handling Non-Standard Response Header
Support
But I am trying to get a formatted output similar to the Table of
Contents with indentations that one will find in a text book or
something similar. I am new to XML any input/directions will make my day!
Thanks,
Subash