W3C home > Mailing lists > Public > www-rdf-interest@w3.org > May 2003

problem in xsl translation to rdf

From: <hgadm@cswebmail.com>
Date: Tue, 20 May 2003 04:04:24 -0700 (PDT)
To: www-rdf-interest@w3.org
Message-Id: <20030520040425.10020.h014.c014.wm@mail.cswebmail.com.criticalpath.net>

Dear all,

I want to transform XML / DC files into an RDF
structure. Here is a snippet of the the original XML:

*************************************************************************************

<?xml version='1.0' encoding='ISO-8859-1' ?>
<?xml:stylesheet type='text/xsl' href='kno2html.xsl'
version='1.0'?>
<azkno:kno
xmlns:azkno='http://expm.rd.ambl.net/kobject/' 
           xmlns:dc='http://purl.org/dc/elements/1.1/' 
          
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
          
xsi:schemaLocation='http://expm.rd.ambl.net/kobject/
azkno.xsd' 
           azkno:summary_template_version='1.0'>

<dc:title>title here</dc:title>
<dc:identifier>mch02</dc:identifier>
<dc:creator>...</dc:creator>
...

<dc:description>...</dc:description>
</azkno:kno>

*************************************************************************************

Here is a snippet just to produce the tag
<rdf:Description rdf:about="..."> :

*************************************************************************************

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:azkno="http://expm.rd.ambl.net/kobject/">
<xsl:output method="xml"/> 

<xsl:template match="/">

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.0/"
         xmlns:dcq="http://purl.org/dc/qualifiers/1.0/"
         xmlns:azkno="http://expm.rd.ambl.net/kobject/">
         
<rdf:Description>
   <xsl:attribute name="rdf:about">
     
<xsl:text>http://expm.rd.ambl.net/kobject/KNO1/</xsl:text>
      <xsl:value-of select="/dc:identifier"/>
      <xsl:text>.rdf</xsl:text>
   </xsl:attribute>

</rdf:Description>
</rdf:RDF>

</xsl:template>

</xsl:stylesheet>

*********************************************************************************************

unfortunately the dc:identifier seems not to be parsed
so the resulting about attribute looks like:

<rdf:Description
rdf:about="http://expm.rd.ambl.net/kobject/KNO1/.rdf">

rather than:
<rdf:Description
rdf:about="http://expm.rd.ambl.net/kobject/KNO1/mch02.rdf">



What am i doing wrong ???

Regards,

Holger

___________________________________________________
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/
Received on Tuesday, 20 May 2003 07:04:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:59 GMT