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

Re: problem in xsl translation to rdf

From: Thomas B. Passin <tpassin@comcast.net>
Date: Tue, 20 May 2003 09:39:01 -0400
To: www-rdf-interest@w3.org
Message-id: <001701c31ed5$2c571e00$6401a8c0@tbp1>

> I want to transform XML / DC files into an RDF
> structure. Here is a snippet of the the original XML:
> ...
> 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">

XSLT qustions are best asked on the Mulberry xslt list.  In this case, you
asked for an element named "dc:identifier" at the top level of the document.
There is no such top-level element, so of course nothing was found.

You could choose to use two templates to get at the desired element, but you
can also easily do it with one. Change  the match statement in the template,
and change the path to dc:identifier, like this (shown with miscellaneous
other simplifications) -

<xsl:template match="/azkno:kno">


The contents of the part marked with braces {}, used to indicate the portion
to be evaluated by the processor, is called an "attribute value template".

BTW, you do not need to surround ordinary text with "xsl:text" tags.  Just
putting the characters on the page is enough.  You only need to use
"xsl:text" in very special circumstances.


Tom P
Received on Tuesday, 20 May 2003 09:39:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:44:42 UTC