Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xsl stylesheet to print out xml

Reply
Thread Tools

xsl stylesheet to print out xml

 
 
ernond_paul@yahoo.fr
Guest
Posts: n/a
 
      04-04-2007
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"?>
<xslutput method="html" indent="yes"/>
<xsl:stylesheet version="1.0" xmlnssl="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 ?

 
Reply With Quote
 
 
 
 
p.lepin@ctncorp.com
Guest
Posts: n/a
 
      04-04-2007
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

 
Reply With Quote
 
 
 
 
ernond_paul@yahoo.fr
Guest
Posts: n/a
 
      04-04-2007
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>

 
Reply With Quote
 
p.lepin@ctncorp.com
Guest
Posts: n/a
 
      04-04-2007
On Apr 4, 10:48 am, ernond_p...@yahoo.fr wrote:
> <?xml version="1.0" encoding="UTF-8"?>
> <xslutput method="html" indent="yes"/>
> <xsl:stylesheet version="1.0"
> xmlnssl="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

 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      04-04-2007
wrote:

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


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


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use output of XSL transformation as new XSL stylesheet barney.b@iname.com XML 0 01-16-2006 02:29 PM
xml:stylesheet use in document with multiple stylesheet options David Blickstein XML 3 08-02-2005 03:10 PM
[XSL] : use array variable in XSL stylesheet MC XML 1 03-24-2005 10:41 AM
Documenting xsl (searching xsl:doc stylesheet) Thomas Sommer XML 0 11-25-2004 01:03 AM
have a stylesheet generate another stylesheet based on XML? Steven An XML 1 11-23-2004 01:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57