XSLT 2.0を使用して、RDF/XMLでエンコードされたコンテンツのXHTMLビューを生成しようとしています。 XSLスタイルシートをモジュール化するために、名前付きテンプレートを使用したいと思います。私の名前付きテンプレートにノードを渡すためにXSLT 2.0を使用した名前付きテンプレートのノードパラメータの使用
私の最初の試みは明らかに機能していません。
私はXSLTの新機能ですが、Web検索では、XSLがノードではなく結果ツリーフラグメント(RTF)を渡しているため、Web検索で問題が発生していると考えられています。これは間違いなくXSLT 1.0の問題ですが、2.0の問題ですか?残念ながら、stackoverflowなどのサイトでXSLノードパッシングの問題を解決する方法を適用する方法は私には分かりません。
XSLT 2.0でも可能なことは何ですか?
どのような方向に向ける必要がありますか?
<xsl:template match="rdf:RDF">
<xsl:variable name="report" select="owl:NamedIndividual[@rdf:about='&ex;quality_report']"/>
<table>
<tr>
<xsl:for-each select="owl:NamedIndividual[@rdf:about=$report/mdsa:hasProductScope/@rdf:resource]">
<td>
<xsl:call-template name="quality_label">
<xsl:with-param name="product_scope" select="."/>
</xsl:call-template>
</td>
</xsl:for-each>
</tr>
</table>
</xsl:template>
<xsl:template name="quality_label">
<xsl:param name="product_scope"/>
<table>
<xsl:for-each select="owl:NamedIndividual[@rdf:about=$product_scope/mdsa:scopeDataEntity/@rdf:resource]">
<tr><td>
<!-- CALL ANOTHER NAMED TEMPLATE TO PROCESS DATA ENTITY -->
</td></tr>
</xsl:for-each>
</table>
</xsl:template>
私も
<xsl:with-param name="entity" select="current()"/>
例RDF/XML
<owl:NamedIndividual rdf:about="&ex;modis_aqua_aod_product_scope">
<rdf:type rdf:resource="&mdsa;ProductScope"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_global_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_global_land_only_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_e_conus_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_w_conus_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_central_america_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_south_america_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_s_south_america_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_africa_above_equator_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_equatorial_africa_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_africa_below_equator_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_europe_mediterranean_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_eurasian_boreal_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_east_asia_midlatitudes_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_peninsular_southeast_asia_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_indian_subcontinent_data_entity"/>
<mdsa:scopeDataEntity rdf:resource="&ex;modis_aqua_australian_continent_data_entity"/>
<mdsa:scopeVariable rdf:resource="urn:nasa:eosdis:variable:MYD08_D3.051:Optical_Depth_Land_And_Ocean_Mean"/>
</owl:NamedIndividual>
<owl:NamedIndividual rdf:about="&ex;quality_report">
<rdf:type rdf:resource="&mdsa;QualityReport"/>
<dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">01ffc5bfba33e7139ffbd4b7185f9b0e</dcterms:identifier>
<mdsa:hasProductScope rdf:resource="&ex;modis_terra_aod_product_scope"/>
<mdsa:hasProductScope rdf:resource="&ex;modis_aqua_aod_product_scope"/>
</owl:NamedIndividual>
「スキーマの意識とは何ですか? Stylus StudioのXMLスキーマツールの一部ですか? – LokiPatera
「スキーマ認識」は、このような間違いをより容易に検出できるように、スキーマをインポートし、スタイルシートを最適化し、より良好な型チェックを提供するために、スキーマタイプ定義を利用するスタイルシートを書くためのXSLT 2.0で能力を指します。 –