Re: Embed XHTML code using PHP's XSLT processor
| From: | Markus Fuchs | Date: | Thu, 02 Feb 2006 21:39:33 +0000 |
| Subject: | Re: Embed XHTML code using PHP's XSLT processor | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229774@lists.php.net to get a copy of this message | ||
"Björn Bartels" wrote:
> Moin, moin...
Moin. :-)
> I'm only 99% sure but I think in this line...
>
> <xsl:apply-templates select="node()" >
>
> ..."node()" returns "CDATA" which drops
> those unnessasary whitespaces and cr/lf's...
Okay, we're almost there, I guess. ;-) I still need your help, though.
If I change my XML from
<content>
<text>
<xhtml:form action="" method="post">
<xhtml:input type="text" id="foo" name="bar" />
<xhtml:input type="submit" name="submit" />
</xhtml:form>
</text>
</content>
to
<content><text><xhtml:form action=""
method="post"><xhtml:input type="text"
id="foo" name="bar" /><xhtml:input type="submit"
name="submit"
/></xhtml:form></text></content>
(all nodes in one single line), the resulting XHTML get correctly indented
for both indent switch settings.
Unfortunately I can't get it to work when I indent the XML data (like in my
first post). Neither normalize-space() nor translate() does the trick...
What am I missing?
Thanks,
Markus