xsl stylesheet to print out xml

Discussion in 'XML' started by ernond_paul@yahoo.fr, Apr 4, 2007.

  1. Guest

    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 ?
    , Apr 4, 2007
    #1
    1. Advertising

  2. Guest

    On Apr 4, 10:48 am, 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, 2007
    #2
    1. Advertising

  3. Guest

    On 4 avr, 10:11, 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, 2007
    #3
  4. Guest

    On Apr 4, 10:48 am, wrote:
    > <?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.

    --
    Pavel Lepin
    , Apr 4, 2007
    #4
  5. wrote:

    > 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.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Apr 4, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven An
    Replies:
    1
    Views:
    499
    Martin Honnen
    Nov 23, 2004
  2. Thomas Sommer
    Replies:
    0
    Views:
    430
    Thomas Sommer
    Nov 25, 2004
  3. MC
    Replies:
    1
    Views:
    7,253
    David Carlisle
    Mar 24, 2005
  4. David Blickstein
    Replies:
    3
    Views:
    1,036
    David Blickstein
    Aug 2, 2005
  5. Replies:
    0
    Views:
    530
Loading...

Share This Page