[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to avoid a blank line

Subject: Re: How to avoid a blank line
From: Manfred Staudinger <manfred.staudinger@xxxxxxxxx>
Date: Fri, 21 Oct 2005 06:21:45 -0700
div avoid breakline
> Are you generating HTML? Do you mean you have a blank line in the HTML
> source, or a blank line on the screen as shown by the browser?
It's a switching forth and back between one large file suitable for editing
and many small xml files which are meant for a browser. One of those
(warning: lines 5 and 6 contain utf-8 chars):

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../view-index.xsl" type="text/xsl"?>
<body xmlns="http://www.w3.org/1999/xhtml">
   <h3>Dr. Johann Aichholz</h3>
   b1520, +1580 Wien
   <br/>b Wien, Anna
   <br/>Beruf: Mediziner
   <div class="index">
      <a href="../Indices/Index.html">Personen-Index</a>
      <span>Quellen:</span>
      <a href="../Regesten/A1581-08-02-00535.xml">1581-08-02</a>
   </div>
</body>

> That kind of change has to be done in the template rules for those text
> nodes. Need to see more detail if you want more specific advice.
True. This is my stylesheet:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0"
			xpath-default-namespace="http://www.w3.org/1999/xhtml"
			xmlns="http://www.w3.org/1999/xhtml"
			xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="LF" select="'&#xA;'" />
<xsl:output method="xml"/>
<xsl:template match="node() | @*">
	<xsl:copy>
     	<xsl:apply-templates select="node() | @*"/>
	</xsl:copy>
</xsl:template>
<xsl:template match="body">
	<xsl:apply-templates select="node() | @*"/>
</xsl:template>
<xsl:template match="div[@class='index']"/>
<xsl:template match="/">
<xsl:value-of select="$LF"/>
<doc>
	<xsl:for-each select="collection('Tests/Indices?select=*.xml')">
	<xsl:value-of select="$LF"/>
	<reg><xsl:apply-templates select="body"/></reg>
	</xsl:for-each>
<xsl:value-of select="$LF"/>
</doc>
</xsl:template>
</xsl:stylesheet>

May I mention an other question (subject: Up-conversion using XSLT 1.0)
I've posted several days ago?

Regards, Manfred Staudinger

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.