Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XML document is ignoring stylesheet

    I am brand new to XML, writing my first RSS feed, and trying to use an XSL stylesheet for the first time.

    My code is working and I can see the feeds, but the output must be in some sort of default format that I did not dictate. I have a stylesheet command in the code, but I believe that it is being ignored. I have tried to swap in different stylesheets and CSS files, made changes to my stylesheet such as huge font sizes, and nothing changes. Also I get completely different output with Firefox than I do with IE, so I have a feeling that the browser is calling the shots.

    My stylesheet command is as simple as can be:
    <?xml-stylesheet type="text/xsl" href="http:{IP}/cyberj/feeder.xsl" ?>

    (Yes, I have the actual IP address in the string, don't want to show it here.)

    The feeder.xsl file is directly from the companion CD to the book "Teach Yourself XML" by Michael Morrison. And if this file were syntactically incorrect, I would get some sort of error message, correct? So I think it is
    never accessed.

    Below are the beginnings of my .xml file and my .xsl file. The .xml file has been validated by feedvalidator.org Any help is appreciated.

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl" href="/cyberj/feeder.xsl" ?>
    
    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
    <title>New Arrivals for Baptist Health South Florida Medical Library</title>
    <description>The last 30 items added to your catalog</description>
    <link>http://cybertools.biz/cyberj/recarr2.xml</link>
    <atom:link href="http://dallas.example.com/rss.xml" rel="self" type="application/rss+xml" />
    <item>
    <title>First item title</title>
    <dc:creator>First author</dc:creator>
    <description>First description</description>
    <link>http://myserver.com/cgi-bin/CyberHTML?BHSFLINK+MARC=3668</link>
    <pubDate>12 Feb 2009 14:52:05 EST</pubDate>
    </item>
    
    .....
    
    --------------------------------------------------------------------
    
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="feeds">
    
    .....
    Last edited by Alex Vincent; 03-21-2009 at 08:15 AM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •