[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hi All,
I'm trying to transform xml to rdf. And found that some elements have more than one values.
And I need to select one value from several.
For example, dc:identifier has two values. And need to choose the second one. <dc:identifier>190511</dc:identifier>
<dc:identifier>http://content.wsulibs.wsu.edu/u?/avery,0</dc:identifier>
Here is my current xslt. <xsl:template match="/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsl:variable name="identifier">
<xsl:value-of select="normalize-space(dc:identifier)"/>
</xsl:variable>
<rdf:Description>
<xsl:attribute name="rdf:about"><xsl:value-of select="$identifier"/></xsl:attribute>
<rdf:type rdf:resource="http://purl.org/gem/qualifiers/GEM2"/>
<xsl:apply-templates select="dc:identifier"/>
....
</rdf:Description>
</rdf:RDF> </xsl:template>
<xsl:template match="dc:identifier"> <dc:identifier rdf:resource="{normalize-space(.)}"/> </xsl:template> ...
Thanks for any tips how to improve performance..
_________________________________________________________________
MSN Messenger8& EkGX ?B6s@N;s?! @V4B D#18?M 4kH-8& 3*4)<<?d. http://messenger.msn.co.kr
[xsl] Select value by position
Subject: [xsl] Select value by position From: "Choi Ryan" <yutaka234@xxxxxxxxxxx> Date: Tue, 29 Aug 2006 14:05:38 +0900 |
Hi All,
I'm trying to transform xml to rdf. And found that some elements have more than one values.
And I need to select one value from several.
For example, dc:identifier has two values. And need to choose the second one. <dc:identifier>190511</dc:identifier>
<dc:identifier>http://content.wsulibs.wsu.edu/u?/avery,0</dc:identifier>
Here is my current xslt. <xsl:template match="/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsl:variable name="identifier">
<xsl:value-of select="normalize-space(dc:identifier)"/>
</xsl:variable>
<rdf:Description>
<xsl:attribute name="rdf:about"><xsl:value-of select="$identifier"/></xsl:attribute>
<rdf:type rdf:resource="http://purl.org/gem/qualifiers/GEM2"/>
<xsl:apply-templates select="dc:identifier"/>
....
</rdf:Description>
</rdf:RDF> </xsl:template>
<xsl:template match="dc:identifier"> <dc:identifier rdf:resource="{normalize-space(.)}"/> </xsl:template> ...
Thanks for any tips how to improve performance..
Cheers, Ryan
_________________________________________________________________
MSN Messenger8& EkGX ?B6s@N;s?! @V4B D#18?M 4kH-8& 3*4)<<?d. http://messenger.msn.co.kr
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] New to XSLT arena, Kamal Bhatt | Thread | Re: [xsl] Select value by position, David Carlisle |
RE: Re: [xsl] What is a better word, sterling | Date | Re: [xsl] What is a better word for, Colin Adams |
Month |
Keywords