[Home] [By Thread] [By Date] [Recent Entries]
On 5/4/06, oknam park <ponda7777@xxxxxxxxxxx> wrote:
(...) And I need to transform this to RDF.
<xsl:template match="gemq:catalogingOrganization">
<xsl:choose> <xsl:when test="gemq:catalogingOrganization/foaf:name">
You should either write simply "foaf:name" (or the longer "self::gemq:catalogingOrganization/foaf:name" which is what you meant).
To output an rdf:resource element, simply write <rdf:resource> (...) </rdf:resource> Optionally, you can add attributes simply using "attribute value templates" (an expression relative to the source document inside curly brackets): <rdf:resource id="{foaf:name}">
(...)
</rdf:resource>Finally, use xsl:value-of only to output the text of the result element: <rdf:resource> <xsl:value-of select="normalize-space(gemq:catalogingOrganization/foaf:phone)" /> </rdf:resource> Last but not least, you can check following resources on the web: [1] XSLT Tutorial http://www.w3schools.com/xsl/ [2] XSL Transformations - from Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/XSLT [3] XSL Frequently Asked Questions - maintained by Dave Pawson http://www.dpawson.co.uk/xsl/ [4] Jeni's XSLT Pages - Jeni Tennison http://www.jenitennison.com/xslt/index.html books: [5] Beginning XSLT by Jeni Tennison http://www.amazon.com/gp/product/1861005946/103-9672661-7999067?n=283155 [6] XSLT 2.0 Programmer's Reference, 3rd Edition by Michael Kay http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764569090.html and reference material: [7] W3C Recommandation - XML Path Language (XPath) Version 1.0 http://www.w3.org/TR/xpath [8] W3C Recommandation - XSL Transformations (XSLT) Version 1.0 http://www.w3.org/TR/xslt Best regards, Eric BrC)chemier
|

Cart



