xsl-list
[Top] [All Lists]

Re: Can someone help me understand why this isn't working?

2005-01-20 08:37:53
Hi;

I am thinking on making this change. However, because it has existed this
way up till now there is a ton of XML with escaped HTML that the system
needs to be able to handle.

Thanks,

Luke

----- Original Message ----- 
From: "Pieter Reint Siegers Kort" <pieter(_dot_)siegers(_at_)elnorte(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Thursday, January 20, 2005 10:00 AM
Subject: RE: [xsl] Can someone help me understand why this isn't working?


Hi Luke,

I see you're generating HTML.
If you can alter your input XML, then it just could be

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="hello.xsl"?>
<greeting>
 <P>Hello, world!</P>
</greeting>

XSL can stay the same.

HTH,
<prs/>

-----Original Message-----
From: Luke Shannon [mailto:lshannon(_at_)futurebrand(_dot_)com]
Sent: Miércoles, 19 de Enero de 2005 05:09 p.m.
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Can someone help me understand why this isn't working?

Hello;

I have a basic example I am trying to get working to convert ;&lt;P&gt; to
<P>.

Here is the XML:

<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl"
href="hello.xsl"?> <greeting>&lt;P&gt;Hello, world!&lt;/P&gt;</greeting>

Here is the XSL:

<?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<title>Today's greeting</title>
</head>
<body>
<xsl:apply-templates select="greeting"/> </body> </html> </xsl:template>
<xsl:template match="P"> <em><xsl:apply-templates/></em> </xsl:template>
</xsl:stylesheet>

I am guessing that the value of greeting selected in the apply-templates
call contains &lt;P&gt;Hello, world!&lt;/P&gt;

I was hoping because the output type was HTML a result tree containing
<p>Hello, world!</p> would be created that my match="P" would process (my
apologies if my terminology is not correct, still getting up to speed with
this).

Am I thinking about this the wrong way? Any advice would help.

Thanks,

Luke



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--