You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Erik Dasque <ed...@silverstream.com> on 2000/02/25 05:11:02 UTC
Nobody seem to agree
My XML file :
<?xml version="1.0" standalone="yes"?>
<DOCUMENT DOC_ID="3" DateCreated="02/08/2000 00:00"
MimeType="text/plain" Version="1">
<Author AUTHOR_ID="1">
<FirstName>John</FirstName>
</Author>
<HTML_BODY><![CDATA[The following piece of client code, which assumes that
<code>bean</code> is a handle to an EJB]]></HTML_BODY>
<TITLE>This is the title of the test doc</TITLE>
</DOCUMENT>
I want to get at :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>This is the title of the test doc</title>
</head>
<body>
The following piece of client code, which assumes that
<code>bean</code> is a handle to an EJB
</body>
</html>
Does everybody agree that my HTML_BODY should use CDATA ?
What XSLT stylesheet do I need to use. The following stylesheet :
...
<html>
<head>
<title><xsl:value-of select="//TITLE"/></title>
</head>
<body>
<xsl:value-of select="//TITLE"/>
<xsl:value-of select="//BODY"/>
</body>
</html>
...
produces the following output :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>This is the title of the test doc</title>
</head>
<body>
The following piece of client code, which assumes that
<code>bean</code> is a handle to an EJB
</body>
</html>
What do you think ? Pierpaolo mentionned that it is due to XALAN incorrect serializer for CDATAs. Using Stylus from Excelon I get the same result. IE XSL processor does to.
TIA
Ed.
Re: Nobody seem to agree
Posted by Pierpaolo Fumagalli <pi...@apache.org>.
> Erik Dasque wrote:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
> <title>This is the title of the test doc</title>
> </head>
> <body>
> The following piece of client code, which assumes that
> <code>bean</code> is a handle to an EJB
> </body>
> </html>
>
> What do you think ? Pierpaolo mentionned that it is due to XALAN
> incorrect serializer for CDATAs. Using Stylus from Excelon I get the
> same result. IE XSL processor does to.
Nope... so, in this case XALAN is correct... I wasn't understanding what
you were trying to do...
Pier
--
--------------------------------------------------------------------
- P I E R -
stable structure erected over water to allow the docking of seacraft
<ma...@betaversion.org> <http://www.betaversion.org/~pier/>
--------------------------------------------------------------------
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <http://www.apachecon.com> --------------------
Re: Nobody seem to agree
Posted by Christian Lizell <Ch...@athega.se>.
Hi!
Maybe I'm not understanding what you would like to do,
but if you would like to get the contents of <HTML_BODY>
and Xalan to leave it alone (not escaping it), you could do
the following:
<xsl:value-of select="//BODY" disable-output-escaping="yes"/>
I use it for including contents of a CDATA-tag that contains
HTML.
/Christian
> Erik Dasque wrote:
>
> My XML file :
>
> <?xml version="1.0" standalone="yes"?>
> <DOCUMENT DOC_ID="3" DateCreated="02/08/2000 00:00"
> MimeType="text/plain" Version="1">
> <Author AUTHOR_ID="1">
> <FirstName>John</FirstName>
> </Author>
> <HTML_BODY><![CDATA[The following piece of client code, which assumes that
> <code>bean</code> is a handle to an EJB]]></HTML_BODY>
> <TITLE>This is the title of the test doc</TITLE>
> </DOCUMENT>
>
>
> I want to get at :
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
> <title>This is the title of the test doc</title>
> </head>
> <body>
> The following piece of client code, which assumes that
> <code>bean</code> is a handle to an EJB
> </body>
> </html>
>
>
> Does everybody agree that my HTML_BODY should use CDATA ?
>
> What XSLT stylesheet do I need to use. The following stylesheet :
> ...
> <html>
> <head>
> <title><xsl:value-of select="//TITLE"/></title>
> </head>
> <body>
> <xsl:value-of select="//TITLE"/>
>
> </body>
> </html>
> ...
>
> produces the following output :
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
> <title>This is the title of the test doc</title>
> </head>
> <body>
> The following piece of client code, which assumes that
> <code>bean</code> is a handle to an EJB
> </body>
> </html>
>
> What do you think ? Pierpaolo mentionned that it is due to XALAN incorrect serializer for CDATAs. Using Stylus from Excelon I get the same result. IE XSL processor does to.
>
> TIA
>
> Ed.
--
__ Athega AB _____________________ for net workers __
Kungsgatan 58 phone +46 8 54513330
S-111 22 Stockholm, SWEDEN fax +46 8 54513338
http://www.athega.se/ mobile +46 709 156000