Hi Steve

Why not use an XSLT to introduce some blank lines, and use regular xml
serialization?

e.g something like:

<xsl:template match="*[not(text())]">
        <xsl:copy>
                <xsl:copy-of select="@*"/>
                <xsl:text>
</xsl:text>
                <xsl:apply-templates/>
                <xsl:text>
</xsl:text>
        </xsl:copy>
</xsl:template>

<xsl:template match="*">
        <xsl:copy>
                <xsl:copy-of select="@*"/>
                <xsl:apply-templates/>
        </xsl:copy>
</xsl:template>

<xsl:template match="a">
        <xsl:copy>
                <xsl:copy-of select="@*"/>
                <xsl:apply-templates/>
        </xsl:copy>
</xsl:template>

That way you can customise the white-space rules for each XHTML type.

Cheers

Con


> -----Original Message-----
> From: Steve Krulewitz [mailto:[EMAIL PROTECTED]
> Sent: Monday, 26 January 2004 08:11
> To: [EMAIL PROTECTED]
> Subject: Re: Control the formatting of seriazlied xhtml?
>
>
> J.Pietschmann wrote:
> > That's no surprise. The XSLT processor strips all whitespace only
> > text nodes from the stylesheet, therefore the space between the
> > "</i18n:text>" tag and "<span" goes away.
>
> The problem I'm trying to solve isn't this, it is the fact
> that when I
> use indenting with the XMLSerializer, the closing tag for the anchor
> element is on a different line than the opening tag.  This
> produces the
> "underline longer than text" artifact on the rendered page.
>
> > Indenting may insert significant whitespace on its own and
> should never
> > be used for producing XHTML.
>
> I'm not after fully indented pages, just something that
> produces legible
> code.  Setting the XMLSerializer to indent does a pretty good job,
> except for the case I described above.
>
> -steve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to