OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   A request for some help with ambigious error messages and xslt styleshee

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: A request for some help with ambigious error messages and xslt stylesheets
  • From: thewade <pdman@aproximation.org>
  • Date: Fri, 23 Dec 2005 16:06:53 -0800
  • User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Hello all,

First let me thank you in advance.  I cannot seem to decode the w3c.org 
documents, or so would my relative sucess indicate.

My primary goal:
I am trying to make an RSS feed with a couple of additional tags and 
additional namespaces as allowed by the  document.
My error here is that the RSS validator and the w3c validator both will 
not reconize the XML reserverd xmlns attributes and thusly throw errors 
for the xmlns prefixed tags.

My seccondary goal:
I want to use an XSLT stylesheet to transform this RSS feed into XHTML 
1.0 transitional for web browsers.
My problem here is even more odd. My stylesheet used to work in Firefox 
but now all I get is "Error loading stylesheet: (null)", and before that 
I would get an XPath error because of the different xmlns namespaces.

The third question I have is purely academic: the RSS validator calims 
that I should not have system DOCTYPES in a feed, as well as 
capitalization in tags: is this a good idea and can I ignore it? (e.g. 
<webmaster> is not valid but <webMaster> is - why?)

I have included sample XML+RSS and XSLT pages at the foot of this email, 
and they can also be viewed at 
http://audio.aproximation.org/?search=sonig and 
http://audio.aproximation.org/xslt.php respectively.

Thank you for your help! Also any good online resorces you can point me 
too would be greatly appreciated!
-thewade
PS: are html emails appreciated on this list, or should I stick with 
plain text?

===aproximation.audio.xml===

<?xml version="1.0"?>
<!DOCTYPE rss SYSTEM "http://aproximation.org/includes/rss.dtd";>
<?xml-stylesheet media="screen" title="web browser view" href="http://audio.aproximation.org/xslt.php"; type="text/xml"?>
<rss version="2.0">
	<channel xmlns:aprox="http://aproximation.org/includes/aprox.dtd"; xmlns:html="http://www.w3.org/1999/xhtml";>
		<title>audio</title>
		<link>http://audio.aproximation.org/http://audio.aproximation.org/</link>
		<description>Experimental noise/industrial/minimal audio based works and auditory code art of/by thewade A.K.A. aproximation A.K.A. Wade McDaniel</description>
		<aprox:keywords>aproximation, thewade, Wade McDaniel, music, noise, experimental, procedural, art, audio, aural, sound, code</aprox:keywords>

		<language>en-us</language>
		<pubDate>Mon, 28 Nov 2005 20:59:49 -0800</pubDate>
		<lastBuildDate>Mon, 28 Nov 2005 20:59:08 -0800</lastBuildDate>
		
		<generator>aproximation feed 1.0</generator>
		<managingEditor>editor@audio.aproximation.org</managingEditor>
		<webMaster>webMaster@aproximation.org</webMaster>

		<item>
			<title>sonig(v2)Mod</title>
			<pubDate>Wed, 01 Dec 2004 22:54:00 -0800</pubDate>
			<link>http://audio.aproximation.org/Music/HasDreams/07-sonig(v2)Mod.mp3</link>
			<aprox:image>http://audio.aproximation.org/thumbnail/HasDreams.jpg</aprox:image>
			<description>size: 4.1 Mb<html:br /></description>

			<guid isPermaLink="true">http://audio.aproximation.org/?guid=371</guid>
		</item>
		<item>
			<title>sonig(v2)</title>
			<pubDate>Fri, 01 Aug 2003 15:00:00 -0700</pubDate>
			<link>http://audio.aproximation.org/Music/Misc/sonigV2.mp3</link>
			<aprox:image>http://audio.aproximation.org/audio.jpg</aprox:image>

			<description>size: 2.7 Mb<html:br />
length: 2:57<html:br />
For this track I recorded Maggie Mayhem&#039;s sister, Leslie, playing the violin. I then used synthsis techniques not unlike violin playing to move back and forth across the sample to make a signal. I used <html:a href="http://iem.kug.ac.at/pd/";>PD 0.36</html:a>, a magnificent little program. Meta-violin.</description>
			<guid isPermaLink="true">http://audio.aproximation.org/?guid=298</guid>
		</item>
		</channel>

</rss>
===aproximation.audio.xslt===
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" indent="yes" encoding="iso-8859-1" />

<xsl:template match="rss">
<html>
 <head>
  <title>aproximation <xsl:value-of select="channel/title"/></title>
  <link href="http://images.aproximation.org/"; rel="alternate" type="application/rss+xml" title="aproximation: images" />
  <link rel="stylesheet" type="text/css" href="http://aproximation.org/includes/rss.css"/>
  <link rel="stylesheet" type="text/css" href="css.php"/>
  <xsl:variable name="description">
   <xsl:value-of select="channel/description"/>
  </xsl:variable>
  <xsl:variable name="keywords">
   <xsl:value-of select="channel/aprox:keywords"/>
  </xsl:variable>
  <xsl:variable name="language">
   <xsl:value-of select="channel/language"/>
  </xsl:variable>
  <xsl:variable name="generator">
   <xsl:value-of select="channel/generator"/>
  </xsl:variable>
  <xsl:variable name="managingeditor">
   <xsl:value-of select="channel/managingEditor"/>
  </xsl:variable>
  <xsl:variable name="webmaster">
   <xsl:value-of select="channel/webMaster"/>
  </xsl:variable>
  <xsl:variable name="pubdate">
   <xsl:value-of select="channel/pubDate"/>
  </xsl:variable>
  <xsl:variable name="lastpubdate">
   <xsl:value-of select="channel/lastPubDate"/>
  </xsl:variable>
  <meta name="description" content="{$description}"/>
  <meta name="keywords" content="{$keywords}"/>
  <meta name="language" content="{$language}"/>
  <meta name="generator" content="{$generator}"/>
  <meta name="managingeditor" content="{$managingeditor}"/>
  <meta name="webmaster" content="{$webmaster}"/>
  <meta name="managingeditor" content="{$pubdate}"/>
  <meta name="webmaster" content="{$lastpubdate}"/>
 </head>
 <body>
  <xsl:apply-templates/>
 </body>
</html>
</xsl:template>

<!-- channel templates -->
<xsl:template match="channel">
  <div class="channel">
   <xsl:apply-templates/>
  </div>
</xsl:template>

<!-- channel blanks -->
<xsl:template match="channel/description">
</xsl:template>
<xsl:template match="channel/aprox:keywords">
</xsl:template>
<xsl:template match="channel/language">
</xsl:template>
<xsl:template match="channel/docs">
</xsl:template>
<xsl:template match="channel/generator">
</xsl:template>
<xsl:template match="channel/webMaster">
</xsl:template>
<xsl:template match="channel/link">
</xsl:template>

<!-- item templates -->
<xsl:template match="item">
  <div class="item">
   <xsl:apply-templates/>
  </div>
</xsl:template>

<xsl:template match="channel/title">
   <h1>
    <a>
     <xsl:attribute name="href">
     <xsl:text>http://</xsl:text>
     <xsl:value-of select="."/>
     <xsl:text>.aproximation.org/</xsl:text>
    </xsl:attribute>
    <xsl:text>aproximation </xsl:text>
    <xsl:value-of select="."/>
   </a>
  </h1>
</xsl:template>

<xsl:template match="channel/managingEditor">
 <a>
  <xsl:attribute name="href">
   mailto:<xsl:value-of select="."/>
  </xsl:attribute>
  editor</a>
</xsl:template>

<xsl:template match="item/title">
   <h2><xsl:value-of select="."/></h2>
</xsl:template>

<xsl:template match="pubDate">
   <b>Published: <xsl:value-of select="."/></b>
</xsl:template>

<xsl:template match="lastBuildDate">
   <b><i>Last updated: <xsl:value-of select="."/></i></b>
</xsl:template>

<xsl:template match="description">
   <p class="description"><xsl:value-of select="."/></p>
</xsl:template>

<xsl:template match="guid">
   <i class="hidden"><xsl:value-of select="."/></i>
</xsl:template>
<xsl:template match="aprox:image">
</xsl:template>

<!-- this part turns links + image + titles into <a href's> -->
<xsl:template match="link">
 <xsl:variable name="src">
  <xsl:text>http://</xsl:text>
  <xsl:value-of select="../../title"/>
  <xsl:text>.aproximation.org/</xsl:text>
  <xsl:value-of select="../aprox:image"/>
 </xsl:variable>
   <a>
    <xsl:attribute name="href">
     <xsl:text>http://</xsl:text>
     <xsl:value-of select="../../title"/>
     <xsl:text>.aproximation.org/?guid=</xsl:text>
     <xsl:value-of select="../guid"/>
    </xsl:attribute>
   <img src="{$src}" />
   </a>
</xsl:template>

</xsl:stylesheet>






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS