은 왜 내가 그것을 예상대로 작동하지 다음을 수행 지정된 네임 스페이스의 속성?출력하는 방법에
<root xmlns:ns0="xmlns"
ns0:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns1="xsi"
ns1:schemaLocation="[some schema location]" />
기본적으로, 수행하여이없는 XML 파일의 schemaLocation을 추가하려고 해요 : -
<xsl:template match="/s:*">
<xsl:element name="{local-name()}" namespace="some other namespace">
<xsl:attribute namespace="xmlns" name="xsi">http://www.w3.org/2001/XMLSchema-instance</xsl:attribute>
<xsl:attribute namespace="xsi" name="schemaLocation">[some-loc]</xsl-attribute>
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
와의 Xalan-C는 위의 XML을 제공합니다. 내가 할 노력하고있어
는 뭔가 같은 : -
<root xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance"
ns0:schemaLocation="[some schema location]" />
잘라 내기/붙여 넣기 문제가 될 수 있지만, 어디입니다 수 있음 첫 번째 일치 항목에 사용 된 s- 접두어가 정의 되었습니까? – conciliator
게시 한 XML 샘플은 실제 출력입니다. 기대하는 결과물 (달성하고자하는 목표)을 보여줄 수 있습니까? 또는 어떻게 든 "내가 기대할 수있는 것"이 무엇인지 설명하십시오. – LarsH
@conciliator는 음의 접두사는 바로 모든 일에 좀 무관하다? 어떤 경우에는이 요소에 정의되어 –
owagh