Hi all:
I'm totally stuck on what is going on when I try to run the following xml against an xsl in an attempt to not get a blank page in the browser:
xml:
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="transform.xsl"?>
<Structure>
<Processes>
<Process>
.
.
.
</Process>
</Processes>
</Structure>
xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<!--trying to convert the tag to another name -->
<xsl:template match="/">
<xsl:element name="NewStructure">
<xsl:apply-templates select="Processes" />
</xsl:element>
</xsl:templates>
<xsl:template name="convert_processes_tag" match="Processes">
<xsl:for-each select="Processes">
<xsl:element name="NewProcess" />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
My goal is to replace the Processes tag with something else, and subsequently all the other tags inside the xml too. My first attempt was to convert the outter most tags first. I have tried cutting down both the xml and the xsl to its skeleton, but all I got was a blank page. I tried googling, but it only further confuses me. I know xsl:template is like a method in OOP, and I wanted to separate it because there will be a lot of looping involved in converting the tags to different names.
Been stuck for hours... any help would be appreciated.
EDIT: I was testing this against IE. Someone has pointed out that XML does not show up when testing in IE. Is that the case?
TIA.