[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Merging multiple RSS feeds into one RSS feed

Subject: Re: Re: Merging multiple RSS feeds into one RSS feed
From: "Jon Gorman" <jonathan.gorman@xxxxxxxxx>
Date: Fri, 21 Apr 2006 14:05:36 -0500
multiple rss feed output
> But when I look at the main.xml file in any viewer this is what I get:

If you mean browser, all I can do is repeat what I mentioned before.
How the XML result of the transformation is displayed depends on the
browser.  In IE it removes all spacing between tags, then dumps the
text (not tags or attributes) from the XML onto the browser window.
It doesn't do the same thing as if you just opened an xml file.  That
"knows" it's an xml file, I believe the XSLT process assumes the
result of transformation will be to generate html and tries to parse
it that way.  Probably a short-coming.  Also a quick test with Firefox
shows that it doesn't seem to run the document(link) although I'm not
entirely sure why.  Maybe there's some setting you can tweak on your
"viewers" to fix this poblem.

But if you run this with  with a processor like xsltproc or Saxon,
you'll notice it works.  I mentioned this last time.

> Test FeedTest Feedhttp://www.test.feedOneThis is item number
> 1http://www.test.feed

So it's doing the transformation, then processing the resulting xml by
removing spaces and newlines between tags, then getting the text
values of each element.  If you had a "view generated source" you'd
see the xml.

>
> How do I get the output from main.mxl to look like the rss feeds I am
> linking to?

Use a different browser or process.  If you're getting confused about
importing the rss feeds, don't.  Try this ultralight transform:

?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="trans.xsl"?>
<doc>
   <p>Hello</p>
</doc>

With trans.xsl being something like:
  <?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" />
<xsl:template match="/">
<newdoc><xsl:apply-templates /></newdoc>
</xsl:template>

 <xsl:template match="p">
 <f>
  <xsl:apply-templates />
  </f>
  </xsl:template>
  </xsl:stylesheet>

Then if you look at the generated source (look for a plugin to do
this) you'll see the xml you expect. (Should be something like:
<newdoc><f>Hello</f></newdoc>.

I'd highly recommend against using the browser to perform transforms
if you are planning on producing XML.  In fact, I'm not quite sure
what you're expecting to do with it.  Without the appropriate plugins
it's not like you can save it.  I'd imagine you'd rather produce the
xml file so a RSS reader can actually handle it.  These would seem to
indicate a different tool than just using a browser.



Jon Gorman

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.