I have only added this additional HTML to my XSL file:
...
<p>my para</p>
<div>
<div>
<div></div>
</div>
</div>
...
The result is:
...
<p>my para</p>
<div>
<div>
<div />
</div>
</div>
...
Which has no indents. The only indents I get are the indents on the HTML
tags that where generated via a template and have content from the XML file.
Here is my XML and XSL:
XML:
...
<?xml version="1.0" encoding="UTF-8"?>
<page>
<title>Hello</title>
<content>
<para>This is my first Cocoon page!</para>
</content>
</page>
...
XSL:
...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xhtml" indent="yes" encoding="UTF-8"/>
<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="page/title"/>
</title>
<link href="/styles/main.css" type="text/css" rel="stylesheet"/>
</head>
<body><xsl:apply-templates/>
<p>my para</p>
<div>
<div>
<div></div>
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="title"><h1><xsl:apply-templates/></h1></xsl:template>
<xsl:template match="content"><xsl:apply-templates
select="para"/></xsl:template>
<xsl:template match="para"><p><xsl:apply-templates/></p></xsl:template>
</xsl:transform>
...
> -----Original Message-----
> From: Joerg Heinicke [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 16 August 2007 11:31 AM
> To: [email protected]
> Subject: Re: output indent yes?
>
> On 15.08.2007 22:37 Uhr, Lincoln Mitchell wrote:
>
> > That's works for content from the hello.XML file but doesn't indent my
> html
> > in the xsl file. Ie:
>
> Sorry, Lincoln. I don't exactly understand what works and what not. What
> do you mean with "content from the hello.XML" and "html in the xsl
> file"? What have you changed?
>
> Joerg
>
> ---------------------------------------------------------------------
> 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]