• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

XSL...please help

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi dell
inside the td give style property,
<td style="display:none"><xsl:value....>
this will hide the fields
bye
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!