|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to avoid a blank line
> 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="'
'" />
<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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








