xsl-list
[Top] [All Lists]

Re: Doctype and namespaces in source/generated files

2004-05-29 12:34:13
That did it, thanks :)

mayo

On Sat, 2004-05-29 at 05:59, G. Ken Holman wrote:
At 2004-05-28 18:44 -0700, Mayo wrote:
I've figured out how to generate doctype for the document, but whenever I 
introduce

doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";

into <xsl:output> element, the spacing in the output gets really weird. I 
know there is <xsl:strip-space>, but that still doesn't fix things.
...
    <xsl:element name="b">
        <xsl:value-of select="'blarg'"/>
    </xsl:element>
...
    <p>xsl test1:
      <b>blarg
</b>

That looks to me like your XSLT processor is inferring indent="yes" for 
<xsl:output>.  This messed me up when I was trying to abut images next to 
each other without any space in between, yet the processor would put each 
image on a new line, thus introducing the new-line sequence after each one.

I explicitly use <xsl:output indent="no"/> and while the resulting HTML 
doesn't look great in a text editor, it looks just fine in a browser, which 
is what is important.

As a result of my own experience, when I teach about indent= I advise my 
students that it is fine for diagnostics but should always be indent="no" 
for production purposes, even when using HTML.  In my case I would never 
have been able to get the images to abut.

I hope this helps.

.......................... Ken

--
Public courses: Spring 2004 world tour of hands-on XSL instruction
Next: 3-day XSLT/XPath; 2-day XSL-FO - Birmingham, UK June 14,2004

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--