음 xsl을 xsd에 적용하라는 지시를 받았습니다. 승인. 그러나 오페라는 그것을 허용하지 않습니다.오페라에서 xsl을 xsl에 적용 할 때의 문제
XSD 파일 :
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet href="sammple.xsl" type="text/xsl" ?>
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="global" type="globaltype"/>
</xs:schema>
XSL 파일 : 나는 파이어 폭스에 sample.xsd를 호출 할 경우
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:template match="xs:element[@name='global']">
<xsl:text>sample</xsl:text>
</xsl:template>
<xsl:template match="/" name="main">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>
이, 아무런 문제가 없습니다. 텍스트 "샘플"을 생성합니다.
하지만 오페라에서 호출하는 경우, 인 오류가 온다 :
This document had an invalid XSLT stylesheet. Error message from the XSLT engine: Error: invalid XML output: unexpected text (non-whitespace text outside root element)
내가 무엇을 할 수는?
편집 : 내 환경 :
오페라 : 버전 11.01
파이어 폭스 : 버전 3.6.13
HTTP 서버 :
들어, 요소
<xsl:text>sample</xsl:text>
둘러싸 : 출력 방법 = "text"/> 내 문제가 해결되었습니다. 고맙습니다. 나는 그 생각조차하지 않았다 – savruk+1 정답. Presto (Opera)와 Webkit (Chrome, Safari)은'xml' 직렬화 방법의 결과를 재분석합니다. –