OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Contained XML tag won't display

[ Lists Home | Date Index | Thread Index ]

Hi
I have an xml tag but when i put another tag inside it, the contained tag does not display
It should display
 
Heading
int main () {
Assign to variable: string [hello]
}

but it instead displays:
 
Heading
int main () {
Assign to variable: 

}
 
The code is below
 
Thanks in advance
James Rayner
 
XML/XSL CODE
Code problem.xml
 
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="problem.xsl" type="text/xsl"?>
<cpp>
<name value="Heading"></name>
 
<f name="main" type="int" >
Assign to variable:
<!-- Tag below won't display -->
<v name="hello" type="string" />
 
</f>
</cpp>
 
Code problem.xsl
 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="
http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd" />
 
<xsl:template match="/">
<html>
<body><font face="courier new">
<p>
   <xsl:apply-templates select="//cpp" />
</p>
</font>
</body>
</html>
</xsl:template>

<!-- <name /> -->
<xsl:template match="name">
<h2>
<xsl:value-of select="@value" />
</h2>
</xsl:template>
 
<!-- <v /> -->
<xsl:template match="v">
<font face="courier new" color="red">
<h5><xsl:value-of select="@types" />[<xsl:value-of select="@names" />]</h5>
</font>
</xsl:template>
 
<!-- <f /> -->
<xsl:template match="f">
<h5><font face="courier new" color="#d500ee">
<xsl:value-of select="@type" />&#160;<xsl:value-of select="@name" />&#160;(<xsl:value-of select="@param" />)&#160;</font>{
<br /><xsl:value-of select="." /><br />}
</h5>
</xsl:template>
</xsl:stylesheet>
End Code
 
<about
   name="RCXAU"
   email="rcxau@yahoo.com"
   question="Why is the buggiest browser the most widespread" />
<VRtech
   motto="Bringing you all things IT (in the near future :-)"
   web="http://vr_tech.tripod.com/" />




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS