[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Create XML
Hello!
I am using this stylesheet. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:owl="http://www.w3.org/2002/07/owl#" > <!--Esta plantilla me dice si es clase, datatypeProperty o objectproperty--> <xsl:output method="xml" indent="yes"/> <xsl:param name="clase">Article</xsl:param> <xsl:template match="rdf:RDF/rdf:Description" name="first"> <xsl:variable name="var" select="concat('#',$clase)"/> <xsl:variable name="var2" select="concat('/',$clase)"/> <xsl:if test="ends-with(@rdf:about,$var) or ends-with(@rdf:about,$var2)"> <xsl:if test=" rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#Class' "> <!-- guardo en el parametro this_is que es Class --> <xsl:call-template name="second"> <xsl:with-param name="this_is" select=" 'Class' "/> </xsl:call-template> </xsl:if> <xsl:if test="rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#ObjectProperty' or rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#TransitiveProperty' or rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#FunctionalProperty' or rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#InverseFunctionalProper ty' or rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#SymmetricProperty' or rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#AnnotationProperty' "> <!-- guardo en el parametro this_is que es ObjectProperty --> <xsl:call-template name="second"> <xsl:with-param name="this_is" select=" 'ObjectProperty' "/> </xsl:call-template> </xsl:if> <xsl:if test="rdf:type/@rdf:resource='http://www.w3.org/2002/07/owl#DatatypeProperty' "> <!-- guardo en el parametro this_is que es DatatypeProperty --> <xsl:call-template name="second"> <xsl:with-param name="this_is" select=" 'DatatypeProperty' "/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="second"> <xsl:param name="this_is"/> <xsl:value-of select="$clase"/> <xsl:text> </xsl:text> <xsl:value-of select="$this_is"/> </xsl:template> </xsl:stylesheet>
<Article id="abc"> <author type="string">John Smith</author> </Article> The problem is that Article, abc, author , John Smith are params and I dont Know how create them to write in the console because I must use the params with $. Than you Izaskun
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|