0
사용자 정의 태그 또는 함수를 XSLT에 추가 할 수 있습니다. 다시 설명 드리겠습니다. include-html
을 내 데모에 추가 할 수 있습니다 .을 찾을 때 XSLT에 로직을 추가 할 수 있습니다. 태그 값이있는 템플릿과 일치합니다 apply-template
에서 수행) 값을 가져 와서 출력하십시오.xslt에서 맞춤 태그를 추가하는 방법은 무엇입니까?
여기 내 코드입니다. 내 예에서 http://xsltransform.net/6pS1zDt/1
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="html" doctype-public="XSLT-compat" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<hmtl>
<head>
<title>New Version!</title>
</head>
<include-html>a</include-html>
</hmtl>
</xsl:template>
<xsl:template match="a">
<xsl:variable name="ab" select="'ss'"/>
<p><xsl:value-of select="$ab"/></p>
</xsl:template>
</xsl:transform>
나는 당신이 이것을 달성 할 수
**<p>ss</p>**
ht에서 시작해야한다. tps : //www.w3schools.com/xml/xsl_intro.asp –
@MatthewWhited 나는 이걸 알고있다. – naveen