- From: Thomas B. Passin <tpassin@comcast.net>
- Date: Tue, 20 May 2003 09:39:01 -0400
- To: www-rdf-interest@w3.org
[<hgadm@cswebmail.com>]> > 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"> ... <rdf:Description rdf:about='http://expm.rd.ambl.net/kobject/KNO1/{dc:identifier}.rdf'> </rdf:Description> ... </xsl:template> 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. Cheers, Tom P
Received on Tuesday, 20 May 2003 09:39:42 UTC