cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Check completeness schematron - is include allowed?

ptc-925411
1-Visitor

Check completeness schematron - is include allowed?

I'm using schematron to extend the check completeness functionality for DITA topics. Since a lot of my extended tests are similar, I'd like to put them in files that are then called, via include into the schematron file for this document.

Like this:


<schema xmlns="&lt;a" style="COLOR:" blue;=" text-decoration:=" underline&quot;=" target="_BLANK" href="http://purl.oclc.org/dsdl/schematron">">http://purl.oclc.org/dsdl/schematron">
<ns uri="&lt;a" style="COLOR:" blue;=" text-decoration:=" underline&quot;=" target="_BLANK" href="http://www.arbortext.com/namespace/atict"">http://www.arbortext.com/namespace/atict" prefix="atict"/>

<include href="ditabase.sch"/">
....
</schema>

When I do that, though, the event log opens with a bunch of messages (see below).

Are includes allowed? If so, how do I avoid these messages? If not, does anyone have a good method for maintaining multiple, similar schematron files?

Thanks,

Steve

Event log messages:

<division date="Thu" oct=" 18=" 15:38:57=" 2012&quot;=" millis="1350599937">
<heading>Publish collab_overview.xml using xsl.</heading>
<record date="Thu" oct=" 18=" 15:38:57=" pdt=" 2012&quot;=" millis="1350599937459"&lt;br"/>severity="info" suppress="1" thread="main">
<level>INFO</level><message>"file_serializer": Set buffering to off
and flushing on pipe # "1".</message>
<context class="com.arbortext.epic.internal.compose.FilterContainerImpl"&lt;br"/>lineNumber="271" method="endDocument"
systemId="FilterContainerImpl.java"></context>
</record>
<record date="Thu" oct=" 18=" 15:38:57=" 2012&quot;=" millis="1350599937"&lt;br"/>severity="info" suppress="1">
<level>MESSAGE</level><message>Operation succeeded.</message>
</record>
</division><division date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976">
<heading>Publish concept.sch using xsl.</heading>
<record date="Thu" oct=" 18=" 15:39:36=" pdt=" 2012&quot;=" millis="1350599976233"&lt;br"/>severity="info" suppress="1" thread="main">
<level>INFO</level><message>"file_serializer": Set buffering to off
and flushing on pipe # "1".</message>
<context class="com.arbortext.epic.internal.compose.FilterContainerImpl"&lt;br"/>lineNumber="271" method="endDocument"
systemId="FilterContainerImpl.java"></context>
</record>
<record date="Thu" oct=" 18=" 15:39:36=" pdt=" 2012&quot;=" millis="1350599976236"&lt;br"/>severity="error" suppress="0" thread="main">
<level>ERROR</level><message linenumber="447"&lt;br"/>systemId="file:/C:/Program%20Files/PTC/Arbortext%20Editor/lib/schematron/iso-schematron-xslt2/iso_dsdl_include.xsl"
>org.xml.sax.SAXParseException: Exception thrown by URIResolver</message>
<context class="com.arbortext.epic.saxfilter.ExceptionAdapter"&lt;br"/>lineNumber="96" method="getSAXParseException"
systemId="ErrorListenerAdapter.java"><context<br/>class="com.arbortext.epic.saxfilter.ErrorListenerAdapter"
lineNumber="65" method="error" systemId="ErrorListenerAdapter.java">
<context class="net.sf.saxon.Controller" linenumber="865"&lt;br"/>method="recoverableError" systemId="Controller.java"><context<br/>class="net.sf.saxon.functions.Document" lineNumber="407"
method="makeDoc" systemId="Document.java"><context<br/>class="net.sf.saxon.functions.Document$DocumentMappingFunction"
lineNumber="224" method="map" systemId="Document.java"><context<br/>class="net.sf.saxon.expr.ItemMappingIterator" lineNumber="46"
method="next" systemId="ItemMappingIterator.java"><context<br/>class="net.sf.saxon.expr.Expression" lineNumber="352"
method="evaluateItem" systemId="Expression.java"><context<br/>class="net.sf.saxon.expr.ExpressionTool" lineNumber="296"
method="evaluate" systemId="ExpressionTool.java"><context<br/>class="net.sf.saxon.expr.LetExpression" lineNumber="339" method="eval"
systemId="LetExpression.java"><context<br/>class="net.sf.saxon.expr.LetExpression" lineNumber="540"
method="processLeavingTail" systemId="LetExpression.java"><context<br/>class="net.sf.saxon.instruct.Choose" lineNumber="686"
method="processLeavingTail" systemId="Choose.java"><context<br/>class="net.sf.saxon.instruct.Block" lineNumber="556"
method="processLeavingTail" systemId="Block.java"><context<br/>class="net.sf.saxon.expr.LetExpression" lineNumber="549"
method="processLeavingTail" systemId="LetExpression.java"><context<br/>class="net.sf.saxon.instruct.Template" lineNumber="203"
method="applyLeavingTail" systemId="Template.java"><context<br/>class="net.sf.saxon.instruct.ApplyTemplates" lineNumber="345"
method="applyTemplates" systemId="ApplyTemplates.java"><context<br/>class="net.sf.saxon.instruct.ApplyTemplates" lineNumber="210"
method="apply" systemId="ApplyTemplates.java"><context<br/>class="net.sf.saxon.instruct.ApplyTemplates" lineNumber="174"
method="processLeavingTail" systemId="ApplyTemplates.java"><context<br/>class="net.sf.saxon.instruct.Block" lineNumber="556"
method="processLeavingTail" systemId="Block.java"><context<br/>class="net.sf.saxon.instruct.Instruction" lineNumber="93"
method="process" systemId="Instruction.java"><context<br/>class="net.sf.saxon.instruct.ElementCreator" lineNumber="296"
method="processLeavingTail" systemId="ElementCreator.java"><context<br/>class="net.sf.saxon.instruct.Copy" lineNumber="205"
method="processLeavingTail" systemId="Copy.java"><context<br/>class="net.sf.saxon.instruct.Template" lineNumber="203"
method="applyLeavingTail" systemId="Template.java"><context<br/>class="net.sf.saxon.instruct.ApplyTemplates" lineNumber="345"
method="applyTemplates" systemId="ApplyTemplates.java"><context<br/>class="net.sf.saxon.instruct.ApplyTemplates" lineNumber="378"
method="defaultAction" systemId="ApplyTemplates.java"><context<br/>class="net.sf.saxon.instruct.ApplyTemplates" lineNumber="333"
method="applyTemplates" systemId="ApplyTemplates.java"><context<br/>class="net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage"
lineNumber="527" method="processLeavingTail"
systemId="ApplyTemplates.java"><context class="net.sf.saxon.Controller"&lt;br"/>lineNumber="1812" method="transformDocument" systemId="Controller.java">
<context class="net.sf.saxon.TransformerHandlerImpl" linenumber="144"&lt;br"/>method="endDocument" systemId="TransformerHandlerImpl.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.epic.saxfilter.XSLTransformer" lineNumber="1178"
method="endDocument" systemId="XSLTransformer.java"><context<br/>class="com.arbortext.epic.internal.compose.FilterContainerImpl"
lineNumber="262" method="endDocument"
systemId="FilterContainerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.BufferedSAXPipe"
lineNumber="273" method="endDocument" systemId="BufferedSAXPipe.java">
<context class="com.arbortext.epic.internal.compose.SAXEventBroadcaster"&lt;br"/>lineNumber="156" method="endDocument"
systemId="SAXEventBroadcaster.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.epic.internal.compose.FilterContainerImpl"
lineNumber="262" method="endDocument"
systemId="FilterContainerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.BufferedSAXPipe"
lineNumber="273" method="endDocument" systemId="BufferedSAXPipe.java">
<context class="com.arbortext.epic.internal.compose.SAXEventBroadcaster"&lt;br"/>lineNumber="156" method="endDocument"
systemId="SAXEventBroadcaster.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.epic.internal.compose.FilterContainerImpl"
lineNumber="262" method="endDocument"
systemId="FilterContainerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.BufferedSAXPipe"
lineNumber="273" method="endDocument" systemId="BufferedSAXPipe.java">
<context class="com.arbortext.epic.internal.compose.SAXEventBroadcaster"&lt;br"/>lineNumber="156" method="endDocument"
systemId="SAXEventBroadcaster.java"><context<br/>class="com.arbortext.epic.saxfilter.ClientProfiler" lineNumber="411"
method="endDocument" systemId="ClientProfiler.java"><context<br/>class="com.arbortext.epic.internal.compose.FilterContainerImpl"
lineNumber="262" method="endDocument"
systemId="FilterContainerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.BufferedSAXPipe"
lineNumber="273" method="endDocument" systemId="BufferedSAXPipe.java">
<context class="com.arbortext.epic.internal.compose.SAXEventBroadcaster"&lt;br"/>lineNumber="156" method="endDocument"
systemId="SAXEventBroadcaster.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.epic.saxfilter.linkresolver.AbstractLinkResolver"
lineNumber="314" method="endDocument"
systemId="AbstractLinkResolver.java"><context<br/>class="com.arbortext.epic.internal.compose.FilterContainerImpl"
lineNumber="262" method="endDocument"
systemId="FilterContainerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.BufferedSAXPipe"
lineNumber="273" method="endDocument" systemId="BufferedSAXPipe.java">
<context class="com.arbortext.epic.internal.compose.SAXEventBroadcaster"&lt;br"/>lineNumber="156" method="endDocument"
systemId="SAXEventBroadcaster.java"><context<br/>class="com.arbortext.epic.saxfilter.ServerProfiler" lineNumber="224"
method="endDocument" systemId="ServerProfiler.java"><context<br/>class="com.arbortext.epic.internal.compose.FilterContainerImpl"
lineNumber="262" method="endDocument"
systemId="FilterContainerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.BufferedSAXPipe"
lineNumber="273" method="endDocument" systemId="BufferedSAXPipe.java">
<context class="com.arbortext.epic.internal.compose.SAXEventBroadcaster"&lt;br"/>lineNumber="156" method="endDocument"
systemId="SAXEventBroadcaster.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.dita.comp.DITAPostprocessFilter" lineNumber="414"
method="endDocument" systemId="DITAPostprocessFilter.java"><context<br/>class="com.arbortext.epic.internal.compose.FilterContainerImpl"
lineNumber="262" method="endDocument"
systemId="FilterContainerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.BufferedSAXPipe"
lineNumber="273" method="endDocument" systemId="BufferedSAXPipe.java">
<context class="com.arbortext.epic.internal.compose.SAXEventBroadcaster"&lt;br"/>lineNumber="156" method="endDocument"
systemId="SAXEventBroadcaster.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultSAXFilter" lineNumber="380"
method="endDocument" systemId="DefaultSAXFilter.java"><context<br/>class="com.arbortext.epic.saxfilter.EpicGenerator" lineNumber="1104"
method="endDocument" systemId="EpicGenerator.java"><context<br/>class="com.arbortext.epic.saxfilter.EpicGenerator" method="atiSaxParse"
systemId="EpicGenerator.java"><context<br/>class="com.arbortext.epic.saxfilter.EpicGenerator" lineNumber="198"
method="access$000" systemId="EpicGenerator.java"><context<br/>class="com.arbortext.epic.saxfilter.EpicGenerator$1" lineNumber="1056"
method="call" systemId="EpicGenerator.java"><context<br/>class="com.arbortext.epic.saxfilter.EpicGenerator$1" lineNumber="1055"
method="call" systemId="EpicGenerator.java"><context<br/>class="com.arbortext.epic.AOMAccessController" lineNumber="150"
method="execute" systemId="AOMAccessController.java"><context<br/>class="com.arbortext.epic.saxfilter.EpicGenerator" lineNumber="1061"
method="runFilter" systemId="EpicGenerator.java"><context<br/>class="com.arbortext.epic.saxfilter.DefaultFilterAdapter"
lineNumber="194" method="runFilter" systemId="DefaultFilterAdapter.java">
<context class="com.arbortext.epic.internal.compose.FilterContainerImpl"&lt;br"/>lineNumber="149" method="runFilter" systemId="FilterContainerImpl.java">
<context class="com.arbortext.epic.internal.compose.ContainedPipeline"&lt;br"/>lineNumber="483" method="runPipeline"
systemId="ContainedPipelineBuilder.java"><context<br/>class="com.arbortext.epic.internal.compose.ComposerImpl$1"
lineNumber="239" method="call" systemId="ComposerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.ComposerImpl$1"
lineNumber="237" method="call" systemId="ComposerImpl.java"><context<br/>class="com.arbortext.epic.internal.compose.ComposerImpl"
lineNumber="250" method="runPipeline" systemId="ComposerImpl.java">
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context></context></context>
</context></context></context></context></context>
</record>
<record date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976"&lt;br"/>severity="info" suppress="1">
<level>MESSAGE</level><message>Operation succeeded.</message>
</record>
</division><division date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976">
<heading>Publish sch_step_concept_1.xsl using xsl.</heading>
<record date="Thu" oct=" 18=" 15:39:36=" pdt=" 2012&quot;=" millis="1350599976420"&lt;br"/>severity="info" thread="main">
<level>INFO</level><message>"file_serializer": Set buffering to off
and flushing on pipe # "1".</message>
<context class="com.arbortext.epic.internal.compose.FilterContainerImpl"&lt;br"/>lineNumber="271" method="endDocument"
systemId="FilterContainerImpl.java"></context>
</record>
<record date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976"&lt;br"/>severity="info">
<level>MESSAGE</level><message>Operation succeeded.</message>
</record>
</division><division date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976">
<heading>Publish sch_step_concept_2.xsl using xsl.</heading>
<record date="Thu" oct=" 18=" 15:39:36=" pdt=" 2012&quot;=" millis="1350599976498"&lt;br"/>severity="info" thread="main">
<level>INFO</level><message>"file_serializer": Set buffering to off
and flushing on pipe # "1".</message>
<context class="com.arbortext.epic.internal.compose.FilterContainerImpl"&lt;br"/>lineNumber="271" method="endDocument"
systemId="FilterContainerImpl.java"></context>
</record>
<record date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976"&lt;br"/>severity="info">
<level>MESSAGE</level><message>Operation succeeded.</message>
</record>
</division><division date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976">
<heading>Publish collab_overview.xml using xsl.</heading>
<record date="Thu" oct=" 18=" 15:39:36=" pdt=" 2012&quot;=" millis="1350599976595"&lt;br"/>severity="info" thread="main">
<level>INFO</level><message>"file_serializer": Set buffering to off
and flushing on pipe # "1".</message>
<context class="com.arbortext.epic.internal.compose.FilterContainerImpl"&lt;br"/>lineNumber="271" method="endDocument"
systemId="FilterContainerImpl.java"></context>
</record>
<record date="Thu" oct=" 18=" 15:39:36=" 2012&quot;=" millis="1350599976"&lt;br"/>severity="info">
<level>MESSAGE</level><message>Operation succeeded.</message>
</record>
</division>
2 REPLIES 2

A workaround that comes to mind would be to try using regular XML file entities or XInclude to bring in reusable Schematron fragments?
BrianJ
12-Amethyst
(To:ptc-925411)

Hi Steve,

Includes are allowed, but relative paths are not currently working
correctly. I have an issue logged with PTC on this and they created SPR
2130489 for it. As far as I know, in the meantime we're forced to either
use absolute paths or avoid includes.

Here's the other big thing I had to work around (in case anyone else
runs into this):
I was working on schematron validations that could be displayed along
with the check completeness functionality AND on a separate custom
dialog that we were creating (run separate from check completeness). To
do this I needed to use the validate_against_schematron() function, and
my schematron files needed some non-ISO tagging to be added. The problem
was that these non-ISO tags were either not getting output to the
results file (from which I parse out the validation errors to help
create our custom dialog), or I was getting errors about those non-ISO
tags. I can't remember which it was. Anyway, my first thought was to
override the xsl file that PTC's schematron implementation uses which
defaults to not allowing foreign tags. As of version 6.0 M020 that
doesn't work, though, because the validate_against_schematron() function
(defined in packages/tools/schematron.acl) sets the path to the xsl
files without allowing for an override in the custom directory. The
other option was to override the validate_against_schematron() function
itself.
I figured out I could do the following so I wouldn't need to maintain a
customized version of the validate_against_schematron() function.
Add a compositionframeworkhook and have it call this function:
function schematron_compose_hook($doc, $type, $where, $params[]) {
if($where != $compose::HK_CFTI_INITIAL ||
basename($params['stylesheet']) != 'ptc_svrl_for_xslt2.xsl') { return 0; }
$params['transformerParams'] = 'allow-foreign=true||' .
$params['transformerParams'];
}

Sorry, that was a long explanation, but hopefully it helps someone?





Brian Jensen
bjensen@bluelid.com

Announcements

Top Tags