ISO SCHEMATRON 2009
XSLT implementation by Rick Jelliffe with assistance from members of Schematron-love-in maillist.
2009-03-18
Two distributions are available. One is for XSLT1 engines.
The other is for XSLT2 engines, such as SAXON 9.
This version of Schematron splits the process into a pipeline of several different XSLT stages.
1) First, preprocess your Schematron schema with iso_dsdl_include.xsl.
This is a macro processor to assemble the schema from various parts.
If your schema is not in separate parts, you can skip this stage.
2) Second, preprocess the output from stage 1 with iso_abstract_expand.xsl.
This is a macro processor to convert abstract patterns to real patterns.
If your schema does not use abstract patterns, you can skip this
stage.
3) Third, compile the Schematron schema into an XSLT script.
This will typically use iso_svrl_for_xslt1.xsl or iso_svrl_for_xslt2.xsl
(which in turn invoke iso_schematron_skeleton_for_xslt1.xsl or iso_schematron_skeleton_for_saxon.xsl)
However, other "meta-styleseets" are also in common use; the principle of operation is the same.
If your schema uses Schematron phases, supply these as command line/invocation parameters
to this process.
4) Fourth, run the script generated by stage 3 against the document being validated.
If you are using the SVRL script, then the output of validation will be an XML document.
If your schema uses Schematron parameters, supply these as command line/invocation parameters
to this process.
The XSLT2 distribution also features several next generation features,
such as validating multiple documents. See the source code for details.
Schematron assertions can be written in any language, of course; the file
sch-messages-en.xhtml contains the diagnostics messages from the XSLT2 skeleton
in English, and this can be used as template to localize the skeleton's
error messages. Note that typically programming errors in Schematron are XPath
errors, which requires localized messages from the XSLT engine.
ANT
---
To give an example of how to process a document, here is a sample ANT task.
<target name="schematron-compile-test" >
<!-- expand inclusions -->
<xslt basedir="test/schematron"
style="iso_dsdl_include.xsl" in="test.sch" out="test1.sch">
<classpath>
<pathelement location="${lib.dir}/saxon9.jar"/>
</classpath>
</xslt>
<!-- expand abstract patterns -->
<xslt basedir="test/schematron"
style="iso_abstract_expand.xsl" in="test1.sch" out="test2.sch">
<classpath>
<pathelement location="${lib.dir}/saxon9.jar"/>
</classpath>
</xslt>
<!-- compile it -->
<xslt basedir="test/schematron"
style="iso_svrl_for_xslt2.xsl" in="test2.sch" out="test.xsl">
<classpath>
<pathelement location="${lib.dir}/saxon9.jar"/>
</classpath>
</xslt>
<!-- validate -->
<xslt basedir="test/schematron"
style="test.xsl" in="instance.xml" out="instance.svrlt">
<classpath>
<pathelement location="${lib.dir}/saxon9.jar"/>
</classpath>
</xslt>
</target>
没有合适的资源?快使用搜索试试~ 我知道了~
lxml-4.1.1.tar.gz
需积分: 1 0 下载量 17 浏览量
2024-03-07
17:51:48
上传
评论
收藏 2.27MB GZ 举报
温馨提示
共302个文件
py:89个
txt:51个
data:44个
lxml 相关依赖
资源推荐
资源详情
资源评论
收起资源包目录
lxml-4.1.1.tar.gz (302个子文件)
pubkey.asc 2KB
pubkey.asc 2KB
etree.c 9.62MB
objectify.c 1.59MB
diff.c 1.11MB
clean.c 874KB
_elementpath.c 697KB
builder.c 340KB
setup.cfg 59B
pretty.css 11KB
style.css 9KB
print.css 977B
framing.css 950B
outline.css 696B
s5-core.css 394B
slides.css 238B
opera.css 207B
entry_content_crazy.data 1KB
background-image-with-unicoded.data 686B
xml-data-island.data 667B
background-image-plus.data 657B
html-plus-time.data 648B
entry_content_style.data 624B
downlevel-hidden.data 610B
entry_content_script_cdata.data 549B
style-expression.data 541B
xml-embedded-js.data 518B
entry_content_ondblclick.data 379B
entry_content_onmouseover.data 371B
entry_content_onmousedown.data 371B
entry_content_onmouseout.data 369B
entry_content_onkeypress.data 369B
entry_content_onmouseup.data 367B
entry_content_onkeydown.data 367B
entry_content_onunload.data 365B
entry_content_onresize.data 365B
entry_content_onchange.data 365B
entry_content_onsubmit.data 365B
entry_content_onclick.data 363B
entry_content_onfocus.data 363B
entry_content_onkeyup.data 363B
entry_content_onreset.data 363B
entry_content_onerror.data 363B
entry_content_onabort.data 363B
entry_content_onblur.data 361B
entry_content_onload.data 361B
style-url-js.data 340B
entry_content_embed.data 338B
entry_content_script_inline.data 336B
entry_content_object.data 327B
entry_content_iframe.data 309B
style-import.data 299B
style-comment.data 298B
entry_content_link.data 294B
entry_content_frame.data 288B
entry_content_applet.data 286B
entry_content_meta.data 283B
entry_content_script.data 279B
javascript-link.data 247B
entry_content_blink.data 236B
style-js-tag.data 207B
test.dtd 160B
bodybg.gif 10KB
blank.gif 49B
lxml.etree_api.h 17KB
etree_api.h 17KB
etree_defs.h 15KB
etree.h 8KB
lxml.etree.h 8KB
lxml_endian.h 289B
lxml-version.h 71B
iepngfix.htc 1KB
shakespeare.html 15KB
MANIFEST.in 955B
slides.js 15KB
Makefile 5KB
Makefile 180B
lxml.mgp 2KB
not-zip-safe 1B
PKG-INFO 3KB
PKG-INFO 3KB
proxies.png 52KB
tagpython.png 20KB
tagpython.png 20KB
tagpython-big.png 19KB
lxml-logo64.png 8KB
xmlerror.pxd 57KB
tree.pxd 19KB
xmlparser.pxd 11KB
etreepublic.pxd 10KB
xslt.pxd 8KB
xpath.pxd 6KB
python.pxd 5KB
htmlparser.pxd 3KB
relaxng.pxd 3KB
xmlschema.pxd 2KB
schematron.pxd 2KB
c14n.pxd 1KB
xinclude.pxd 852B
dtdvalid.pxd 671B
共 302 条
- 1
- 2
- 3
- 4
资源评论
选择与努力
- 粉丝: 248
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功