Re: Help Needed: Using SVG command "use xlink:href="#local_variable_name" in XSLT

Apologies, but the attached files are slightly wrong. Have pasted them in this mail again. 
Just in case anyone tries it out. 
  ----- Original Message ----- 
  From: Patrick Soh 
  To: www-svg@w3.org 
  Sent: Tuesday, January 20, 2004 7:26 PM
  Subject: Help Needed: Using SVG command "use xlink:href="#local_variable_name" in XSLT


  Hi, 
  I am trying to put into XSL file the SVG command "use xlink:href="#local_variable_name" but XSL keeps rejecting it. The Error Message is "Error in input XSL: Error: Reference to undeclared namespace prefix:'xlink'. 

  The XSL works fine if I change the command to "use xlink-href="#local_variable_name" i.e. as long as I do not refer to xlink:href. 

  Attached is my xsl file and xml datafile. 

  Any help much appreciated. 

  By the way, Happy Chinese New Year to all the chinese out there!

  Patrick Soh 


  My XSL File :-
  <?xml version="1.0"?>
  <!-- 1st Style Sheet to convert traffic details -->
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" />

  <xsl:template match="/">
   
  <!-- xsl:text disable-output-escaping="yes" -->

  <xsl:variable name="loc-id"> </xsl:variable>
  <!-- xsl:variable name="dtime"  / -->
  <!-- ddtime="{$dtime}{title}"></ddtime -->
  <date> <xsl:value-of select="//page/title" /> </date>
  <time>  <xsl:value-of select="//page/row/eventtime" />
  </time>


   <xsl:for-each select="//page/row">
    <!-- xsl:text disable-output-escaping="yes" -->
     <use xlink-href="#{$loc-id}{locationid}" stroke="{color}"/>
     <!-- /xsl:text -->
    
   </xsl:for-each>
  <!-- /xsl:text -->
  </xsl:template>


  My xml data file is 
  <?xml-stylesheet type="text/xsl" href="trafficdetails1901.xsl"?>
  <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">

  <title>19/01/2004 </title>
  <row>
   <eventtime>17:00</eventtime>
   <roadid>LDP</roadid>
   <locationid>LDP-Sunway</locationid>
   <description>SMOOTH TRAFFIC</description>
   <color>BLUE</color>
  </row>
  <row>
   <eventtime>17:00</eventtime>
   <roadid>LDP</roadid>
   <locationid>LDP-Motorola</locationid>
   <description>HEAVY TRAFFIC</description>
   <color>orange</color>
  </row>
  <row>
   <eventtime>17:00</eventtime>
   <roadid>LDP</roadid>
   <locationid>LDP-PJ</locationid>
   <description>BUMPER-TO-BUMPER TRAFFIC</description>
   <color>red</color>
  </row>
  </page>

Received on Tuesday, 20 January 2004 06:48:59 UTC