• 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

Tags in XSL

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i wonder how to tell the XSLT Processor Xalan how to print
the XML Tags formatted
i'll take the following lines to show what i mean.
<pre>
<xsl:template name = "makeCatalog">
<CATALOG_STRUCTURE type="leaf">
<GROUP_ID><xsl:value-of select="/x/Datagroup/wgnr"/></GROUP_ID>
<GROUP_NAME><xsl:value-of select="/x/Datagroup/Warengr"/></GROUP_NAME>
<GROUP_DESCRIPTION>n/a</GROUP_DESCRIPTION>
<PARENT_ID>n/a</PARENT_ID>
</CATALOG_STRUCTURE>
</xsl:template>
</pre>
The result should be
<pre>

<CATALOG_STRUCTURE type="leaf">
<GROUP_ID>some value<GROUP_ID>
<GROUP_NAME>some value<GROUP_NAME>
<GROUP_DESCRIPTION>n/a</GROUP_DESCRIPTION>
<PARENT_ID>n/a</PARENT_ID>
</CATALOG_STRUCTURE>
</pre>
but he writes the tags in a row.
<CATALOG_STRUCTURE type="leaf"><GROUP_ID>some value</GROUP_ID><GROUP_NAME>some value</GROUP_NAME><GROUP_DESCRIPTION>n/a</GROUP_DESCRIPTION><PARENT_ID>n/a</PARENT_ID></CATALOG_STRUCTURE>
No Problem for Xerces to parse it but for Human nearly unreadable.Can anyone of you help me ?
Thx,
Holger
 
Holger Prause
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think i should use
<xsl reserve-space> but id ont know how.Can anyone of u post me an example ?
Thx,
Holger
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!