I tried with EditiX (
http://www.editix.com) and I have no problem with
indenting.
Whad kind of transformer do you use ?? If you don't know and use a Java
environment may I suggest you Xalan (
http://xml.apache.org) or Saxon
(
http://saxon.sourceforge.net).
Best wishes,
A.Brillant
cawoodm@gmail.com wrote:[color=blue]
> I have a simple xml file:
>
> <document>
> <header>
> <title>Hello World!</title>
> </header>
> </document>
>
> Which I want to transform into HTML. The following transform produces
> indented XHTML:
>
> <?xml version="1.0"?>
> <xslout:stylesheet xmlns:xslout="http://www.w3.org/1999/XSL/Transform">
>
> <xslout:output encoding="utf-8" method="html" indent="yes" />
>
> <xslout:template match="/document">
> <html><xslout:apply-templates /></html>
> </xslout:template>
>
> <xslout:template match="header">
> <title><xslout:value-of select="title"/></title>
> </xslout:template>
>
> </xslout:stylesheet>
>
>
> The following (IMO identical) transform will not indent:
>
>
> <?xml version="1.0"?>
> <xslout:stylesheet xmlns:xslout="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> <xslout:output encoding="utf-8" method="html" indent="yes" />
>
> <xslout:template match="/">
> <html>
> <title><xslout:value-of select="document/header/title"/></title>
> </html>
> </xslout:template>
>
> </xslout:stylesheet>
>
>
> Can anyone tell me why?
>[/color]