我在寫一個XSLT並在java中運行它。我正在使用Saxon
。當我運行我的程序時,我得到了下面的異常。xslt在輸出方法創建時出現混亂
Error at xsl:value-of on line 314 of chapters.xsl:
SERE0014: Illegal HTML character: decimal 157
at xsl:call-template name="entry" (file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl#417)
in built-in template rule
at xsl:apply-templates (file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl#385)
processing /chapter/section[1]/section[5]/table[1]/tgroup[1]/tbody[1]
at xsl:apply-templates (file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl#370)
processing /chapter/section[1]/section[5]/table[1]/tgroup[1]
at xsl:apply-templates (file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl#205)
processing /chapter/section[1]/section[5]/table[1]
at xsl:apply-templates (file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl#205)
processing /chapter/section[1]/section[5]
at xsl:apply-templates (file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl#61)
processing /chapter/section[1]
at xsl:apply-templates (file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl#19)
processing /chapter
; SystemID: file:///C:/Users/u0138039/Desktop/Proview/HK/2016/COMPORD/final/XSLT/chapters.xsl; Line#: 314; Column#: -1
net.sf.saxon.trans.XPathException: Illegal HTML character: decimal 157
at net.sf.saxon.serialize.HTMLEmitter.writeEscape(HTMLEmitter.java:366)
at net.sf.saxon.serialize.XMLEmitter.characters(XMLEmitter.java:594)
at net.sf.saxon.serialize.HTMLEmitter.characters(HTMLEmitter.java:428)
at net.sf.saxon.serialize.HTMLIndenter.characters(HTMLIndenter.java:255)
at net.sf.saxon.event.ProxyReceiver.characters(ProxyReceiver.java:194)
at net.sf.saxon.event.ProxyReceiver.characters(ProxyReceiver.java:194)
at net.sf.saxon.event.ProxyReceiver.characters(ProxyReceiver.java:194)
at net.sf.saxon.event.ProxyReceiver.characters(ProxyReceiver.java:194)
at net.sf.saxon.event.ComplexContentOutputter.characters(ComplexContentOutputter.java:174)
at net.sf.saxon.expr.instruct.ValueOf.processValue(ValueOf.java:295)
at net.sf.saxon.expr.instruct.SimpleNodeConstructor.processLeavingTail(SimpleNodeConstructor.java:222)
at net.sf.saxon.expr.instruct.ValueOf.processLeavingTail(ValueOf.java:280)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.AnalyzeString.processLeavingTail(AnalyzeString.java:443)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:516)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1061)
at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:284)
at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:244)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Template.expand(Template.java:367)
at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:343)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:419)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.trans.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:65)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1100)
at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:516)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1061)
at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:284)
at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:244)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:284)
at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:244)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:284)
at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:244)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:284)
at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:244)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:284)
at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:244)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:144)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:450)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:389)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:669)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:336)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1124)
at net.sf.saxon.Controller.transformDocument(Controller.java:2106)
at net.sf.saxon.Controller.transform(Controller.java:1705)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:547)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:177)
at com.s1a.alpha.APP2.main(APP2.java:74)
而且我已經改變了我的輸出methon到xml
,它最初是html
。令我驚訝的是,沒有異常,並生成文件。我很好奇,想知道如何和爲什麼這個失敗html
和成功與xml
感謝
您可以顯示錯誤來源的'xsl:on line 314'值嗎?謝謝! –
@TimC'\t的 \t \t \t \t \t的 \t \t \t \t XSL:非匹配子串>'中這塊我已經''in line 314 –
user3872094