• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tags in XSL

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic