XSLT 2.0을 사용하여 RDF/XML로 인코딩 된 내용의 XHTML보기를 생성하려고합니다. XSL 스타일 시트를 모듈화하고 간단하게 명명 된 템플릿을 사용하고 싶습니다.XSLT 2.0을 사용하여 명명 된 템플릿에서 노드 매개 변수 사용
내 명명 된 템플릿에 노드를 전달하려는 초기 시도가 명확하게 작동하지 않습니다.
XSLT를 처음 사용했지만 웹 검색을 통해 XSL이 노드 대신 결과 트리 조각 (RTF)을 전달하기 때문에 문제가 있다고 생각하게되었습니다. 이것은 XSLT 1.0에서 분명히 중요한 문제이지만 2.0에서 문제가됩니까? 불행히도, 그것은 stackoverflow 및 유사한 사이트에 XSL 노드 통과 질문에 제기 된 솔루션을 적용하는 방법을 나에게는 분명하지 않습니다.
XSLT 2.0에서도 가능한 작업을 원하십니까?
어떤 방향으로해야합니까? namedIndividual :
<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에서 스키마를 가져 와서 스타일 정의를 사용하여 스타일 시트를 최적화하고 더 나은 유형 확인을 제공하는 스타일 시트를 작성하는 기능을 말하며, 이와 같은 실수를 쉽게 감지 할 수 있도록합니다. –