This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XSL...please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL...please help" Watch "XSL...please help" New topic
Author

XSL...please help

dell computer
Greenhorn

Joined: Oct 19, 2000
Posts: 3
I am new to xsl...
I have generated a table using xml and xsl....
I want some fields to be hidden for localised fields...
How to make the fields hidden in xsl file...
the following are the xml and xsl files:
I want to make H_DESC_KEY , TYPE,BASIS ans STATE field hidden...what I should do here???
hello.xml:
<?xml version = '1.0'?>
<?xml-stylesheet href="hello.xsl" type="text/xsl"?>
<top>
<data NUM="1">
<HIERARCHY_ID>1</HIERARCHY_ID>
<H_DESC_KEY localized="Manufacturing Product Hierarchy"
>Production001</H_DESC_KEY>
<TYPE localized="Product">Product</TYPE>
<BASIS localized="Product Style">ProdStyle</BASIS>
<STATE localized="Locked">Locked</STATE>
<HLEVEL_ID NULL="YES" />
</data>
<data NUM="2">
<HIERARCHY_ID>2</HIERARCHY_ID>
<H_DESC_KEY localized="Pricing Product Hierarchy">PricingPro001</H_DESC_KEY>
<TYPE localized="Product">Product</TYPE>
<BASIS localized="[HLevel 102 localized description]">HLevel</BASIS>
<STATE localized="Pending">Pending</STATE>
<HLEVEL_ID>102</HLEVEL_ID>
</data>
<data NUM="3">
<HIERARCHY_ID>3</HIERARCHY_ID>
<H_DESC_KEY localized="Pricing Customer Hierarchy">PricingCus001</H_DESC_KEY>
<TYPE localized="Customer">Customer</TYPE>
<BASIS localized="Customer">Customer</BASIS>
<STATE localized="Pending">Pending</STATE>
<HLEVEL_ID NULL="YES"/>
</data>
<data NUM="4">
<HIERARCHY_ID>4</HIERARCHY_ID>
<H_DESC_KEY localised="Sales Performance Hierarchy">Salesperfo001</H_DESC_KEY>
<TYPE localized="Product">Product</TYPE>
<BASIS localized="[HLevel 102 localized description]">HLevel</BASIS>
<STATE localized="Locked">Locked</STATE>
<HLEVEL_ID>104</HLEVEL_ID>
</data>
</top>
hello.xsl:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<HTML>
<BODY>
<TABLE BORDER="2" CELLSPACING="8" CELLPADDING="5" WIDTH="80%" HEIGHT="50%" BGCOLOR="#00FFFF" BORDERCOLOR="#000000">
<CAPTION ALIGN="Top">Hierarchy</CAPTION>
<!-- Create table titles -->
<TR>
<TD>HIERARCHY_ID</TD>
<TD>H_DESC_KEY</TD>
<TD>TYPE</TD>
<TD>BASIS</TD>
<TD>STATE</TD>
<TD>HLEVEL_ID</TD>
</TR>
<!-- Do a for-each loop -->
<xsl:for-each select="top/data">
<!-- Create a new table row -->
<TR>
<!-- Create and populate table cells -->
<TD><xsl:value-of select="HIERARCHY_ID"/></TD>
<TD><xsl:value-of select="H_DESC_KEY"/></TD>
<TD><xsl:value-of select="TYPE"/></TD>
<TD><xsl:value-of select="BASIS"/></TD>
<TD><xsl:value-of select="STATE"/></TD>
<TD><xsl:value-of select="HLEVEL_ID"/></TD>
</TR>
</xsl:for-each>
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>

prabhu palanisamy
Greenhorn

Joined: Oct 30, 2000
Posts: 27
hi dell
inside the td give style property,
<td style="display:none"><xsl:value....>
this will hide the fields
bye
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSL...please help
 
Similar Threads
xsl issue for newbie
Problem with using PrintWriter inside a JSP
attributes....
Building tables in XSL
xml xls not seeing anything