xsl stylesheet to print out xml

E

ernond_paul

Hi,

I'm currently having trouble using an xsl file to print my xml datas
into a web browser.
In fact, the xsl does not interpreted.
This is my xml file :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="xsl.xsl" type="text/xsl" ?>
<urlset>
<url>
<loc>http://www.loc>
<priority>0.5</priority>
<lastmod>2007-04-03T17:00:09+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.</loc>
<priority>0.5</priority>
<changefreq>daily</changefreq>
</url>
</urlset>

And my xsl file is like this :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:eek:utput method="html" indent="yes"/>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
<xsl:template match="/">
<html>
<head>
<title>Sitemap</title>
</head>
<body>

</body>
</html>
</xsl:template>
</xsl:stylesheet>

This is a "primitive" example, but it doesn't works for me.. Could you
help me ?
 
P

p.lepin

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="xsl.xsl" type="text/xsl" ?>
<urlset>
<url>
<loc>http://www.loc>
<priority>0.5</priority>
<lastmod>2007-04-03T17:00:09+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.</loc>
<priority>0.5</priority>
<changefreq>daily</changefreq>
</url>
</urlset>

I'm not sure whether it's an actual problem with your
document or just another case of google groups getting
seriously confuzzled and mangling a post, but the above
document is not well-formed. XML documents that are not
well-formed are not XML documents and therefore cannot be
processed as such.
 
E

ernond_paul

but the above
document is not well-formed. XML documents that are not
well-formed are not XML documents and therefore cannot be
processed as such.

ok, if you mean that this line is incorrect :
<loc>http://www.loc>
In reality, this was for my example on this post... When I test it
locally, I've this :
<loc>http://www.xxxx</loc>
 
P

p.lepin

<?xml version="1.0" encoding="UTF-8"?>
<xsl:eek:utput method="html" indent="yes"/>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

This is just plain wrong (and not well-formed either, for
that matter).
This is a "primitive" example, but it doesn't works for
me.. Could you help me ?

1. Try reading some introductory XSLT materials.
2. Get a standalone XSLT processor (there are many) to
debug your transformations.
 
M

Martin Honnen

And my xsl file is like this :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:eek:utput method="html" indent="yes"/>

You need to write well-formed XSLT, the root element needs to be the
xsl:stylesheet element and the xsl:eek:utput needs to be a child of the
xsl:stylesheet element.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top