XSL 파일을 통해 변환하려고하는 XML 파일이 있습니다. 내 XSL 루트 요소에 비어 있지 않은 xmlns 특성을 추가하자마자 변환을 통해 모든 데이터가 다시 비어있게됩니다. xmlns 특성을 제거하거나 비우는 경우 내가 예상 한대로 돌아옵니다."xmlns"속성으로 인해 내 XSLT에서 공백 값이 반환됩니다.
아무도 왜 이런 일이 일어나고 있는지 말할 수 있습니까?
<?xml version='1.0' encoding='UTF-8' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rxr="http://ilrt.org/discovery/2004/03/rxr/" xmlns:esd="http://www.esd.org.uk/standards"
xmlns:core="http://www.govtalk.gov.uk/core" xmlns:n2="http://www.govtalk.gov.uk/metadata/egms"
xmlns:apd="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails"
xmlns:con="http://www.govtalk.gov.uk/people/ContactTypes"
xmlns:bs7666="http://www.govtalk.gov.uk/people/bs7666">
<!-- A template for the ControlledListStructures -->
<xsl:template name="ControlledListStructure">
<xsl:param name="structure"/>
<p class="controlledlist">
<xsl:value-of select="$structure/text()" />
<xsl:if test="$structure/@Id | $structure/@ConceptId | $structure/@ItemName | $structure/@ListName">
<span class="metainfo">[
<xsl:if test="$structure/@Id">
ID: <xsl:value-of select="$structure/@Id" />;
</xsl:if>
<xsl:if test="$structure/@ConceptId">
Concept ID: <xsl:value-of select="$structure/@ConceptId" />;
</xsl:if>
<xsl:if test="$structure/@ItemName">
Item Name: <xsl:value-of select="$structure/@ItemName" />;
</xsl:if>
<xsl:if test="$structure/@ListName">
List Name: <xsl:value-of select="$structure/@ListName" />
</xsl:if>
]
</span>
</xsl:if>
</p>
</xsl:template>
</xsl:stylesheet>
:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ... >
<xsl:import href="html_commonstructures.xsl"/>
<xsl:output method="html"/>
<xsl:template match="/">
<div>
<xsl:call-template name="ServiceStructure">
<xsl:with-param name="structure" select="ServiceDescription" />
</xsl:call-template>
</div>
</xsl:template>
<xsl:template name="ServiceStructure">
<xsl:param name="structure"/>
<h3>
<xsl:value-of select="$structure/DC.Title" /> (<xsl:value-of select="$structure/DC.Identifier" />)
</h3>
<!-- And so on -->
</xsl:template>
</xsl:stylesheet>
이 * 편집 여기 * 가 html_commonstructures에 무엇이의 조각입니다 : 여기
내 XSL의 비트 (일부 부품은 &가 ... 대체 생략)이다
I * 생각합니다. * 가져 오기 충돌에서 이런 종류의 것을 보았습니다. html_commonstructures.xsl도 제공 할 수 있습니까? – annakata