일부 html을 지우려고합니다. 나는 깔끔한xsltproc html 문서
$ tidy -asxml -i -w 150 -o o.xml index.html
결과 XHTML라는 엔티티를 가진 끝과 XHTML하도록 전환했다. 해당 xhtml에서 xsltproc을 시도하면 오류가 계속 발생합니다.
: 나는 이름과 ID를 가지고 태그에 불만을 xsltproc에 --html 추가하는 경우$ xsltproc --novalid -o out.htm t.xsl o.xml
o.xml:873: parser error : Entity 'mdash' not defined
resources to storing data and using permissions — as needed.</
^
o.xml:914: parser error : Entity 'uarr' not defined
</div><a href="index.html#top" style="float:right">↑ Go to top</a>
^
o.xml:924: parser error : Entity 'nbsp' not defined
Android 3.2 r1 - 27 Jul 2011 12:18
는 XSLT는 간단하다
$ xsltproc --novalid --html -o out.htm t.xsl o.xml o.xml:845: element a: validity error : ID top already defined
<a name="top" id="top"></a>
^
(유효) 같은 이름의 속성
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="//*[@id=side-nav]"/>
</xsl:stylesheet>
왜 --html이 작동하지 않습니까? 왜 불평입니까? 아니면 그것을 잊어서 엔티티를 수정해야합니까?
그래서 무엇이 문제입니까? 나는 하나도 보지 못한다. –