468,140 Members | 1,346 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

xsl stylesheet to print out xml

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:output 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 ?

Apr 4 '07 #1
4 2000
On Apr 4, 10:48 am, ernond_p...@yahoo.fr wrote:
<?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.

--
Pavel Lepin

Apr 4 '07 #2
On 4 avr, 10:11, p.le...@ctncorp.com wrote:
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>

Apr 4 '07 #3
On Apr 4, 10:48 am, ernond_p...@yahoo.fr wrote:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:output 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.

--
Pavel Lepin

Apr 4 '07 #4
er*********@yahoo.fr wrote:
And my xsl file is like this :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:output method="html" indent="yes"/>
You need to write well-formed XSLT, the root element needs to be the
xsl:stylesheet element and the xsl:output needs to be a child of the
xsl:stylesheet element.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Apr 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Sarah Haskins | last post: by
1 post views Thread by geotso | last post: by
5 posts views Thread by Lee K. Seitz | last post: by
48 posts views Thread by David J Patrick | last post: by
5 posts views Thread by David Trimboli | last post: by
8 posts views Thread by Mark Shroyer | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.