<font size=2 face="sans-serif">Hi George,</font>
<br>
<br><font size=2 face="sans-serif">thanks for the hint for schematron +
xslt. It will probably work for most of my cases. </font>
<br>
<br><font size=2 face="sans-serif">However, this doesn't seem to work for
schematron included into xsd. Here is what I tried:</font>
<br><font size=2 color=#8100ff>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</font><font size=2><br>
</font><font size=2 color=#002f80>&lt;xs:schema</font><font size=2 color=#ff8141>
</font><font size=2><br>
</font><font size=2 color=#ff8141> &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#00a1e0>xmlns:xs</font><font size=2 color=#ff8141>=</font><font size=2 color=#a13f00>&quot;</font><a href=http://www.w3.org/2001/XMLSchema><font size=2 color=#a13f00>http://www.w3.org/2001/XMLSchema</font></a><font size=2 color=#a13f00>&quot;</font><font size=2><br>
</font><font size=2 color=#ff8141> &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#00a1e0>xmlns:sch</font><font size=2 color=#ff8141>=</font><font size=2 color=#a13f00>&quot;</font><a href=http://www.ascc.net/xml/schematron><font size=2 color=#a13f00>http://www.ascc.net/xml/schematron</font></a><font size=2 color=#a13f00>&quot;</font><font size=2><br>
</font><font size=2 color=#ff8141> &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#00a1e0>xmlns:xsl</font><font size=2 color=#ff8141>=</font><font size=2 color=#a13f00>&quot;</font><a href=http://www.w3.org/1999/XSL/Transform><font size=2 color=#a13f00>http://www.w3.org/1999/XSL/Transform</font></a><font size=2 color=#a13f00>&quot;</font><font size=2><br>
</font><font size=2 color=#ff8141> &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#00a1e0>xmlns:gdvdl</font><font size=2 color=#ff8141>=</font><font size=2 color=#a13f00>&quot;</font><a href="http://www.gdv-dl.de/"><font size=2 color=#a13f00>http://www.gdv-dl.de</font></a><font size=2 color=#a13f00>&quot;</font><font size=2><br>
</font><font size=2 color=#ff8141> &nbsp; &nbsp; &nbsp; &nbsp;elementFormDefault=</font><font size=2 color=#a13f00>&quot;qualified&quot;</font><font size=2 color=#0000a1>&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;xs:include</font><font size=2 color=#ff8141>
schemaLocation=</font><font size=2 color=#a13f00>&quot;gdvdl-generic-book.xsd&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;xs:include</font><font size=2 color=#ff8141>
schemaLocation=</font><font size=2 color=#a13f00>&quot;gdvdl-generic-topic.xsd&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;xs:include</font><font size=2 color=#ff8141>
schemaLocation=</font><font size=2 color=#a13f00>&quot;gdvdl-generic-inline.xsd&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;xs:annotation&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;xs:appinfo&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;sch:ns</font><font size=2 color=#ff8141>
prefix=</font><font size=2 color=#a13f00>&quot;gdvdl&quot;</font><font size=2 color=#ff8141>
uri=</font><font size=2 color=#a13f00>&quot;</font><a href="http://www.gdv-dl.de/"><font size=2 color=#a13f00>http://www.gdv-dl.de</font></a><font size=2 color=#a13f00>&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0060a0>&lt;xsl:function</font><font size=2 color=#ff8141>
name=</font><font size=2 color=#a13f00>&quot;gdvdl:test&quot;</font><font size=2 color=#ff8141>
as=</font><font size=2 color=#a13f00>&quot;xs:boolean&quot;</font><font size=2 color=#0000a1>&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0060a0>&lt;xsl:param</font><font size=2 color=#ff8141>
name=</font><font size=2 color=#a13f00>&quot;Input&quot;</font><font size=2 color=#ff8141>
as=</font><font size=2 color=#a13f00>&quot;xs:string&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0060a0>&lt;xsl:sequence</font><font size=2 color=#ff8141>
select=</font><font size=2 color=#a13f00>&quot;string-length($Input) =
3&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0060a0>&lt;/xsl:function&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;sch:pattern&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;rule</font><font size=2 color=#ff8141>
context=</font><font size=2 color=#a13f00>&quot;title&quot;</font><font size=2 color=#ff8141>
role=</font><font size=2 color=#a13f00>&quot;warn&quot;</font><font size=2 color=#0000a1>&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;assert</font><font size=2 color=#ff8141>
test=</font><font size=2 color=#a13f00>&quot;gdvdl:test(.)&quot;</font><font size=2 color=#0000a1>&gt;</font><font size=2>The
title should contain exactly 3 characters.</font><font size=2 color=#0000a1>&lt;/assert&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;/rule&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;rule</font><font size=2 color=#ff8141>
context=</font><font size=2 color=#a13f00>&quot;title&quot;</font><font size=2 color=#ff8141>
role=</font><font size=2 color=#a13f00>&quot;warn&quot;</font><font size=2 color=#0000a1>&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;assert</font><font size=2 color=#ff8141>
test=</font><font size=2 color=#a13f00>&quot;string-length(.) = 4&quot;</font><font size=2 color=#0000a1>&gt;</font><font size=2>The
title should contain exactly 4 characters.</font><font size=2 color=#0000a1>&lt;/assert&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;/rule&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#0000a1>&lt;/sch:pattern&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;/xs:appinfo&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;/xs:annotation&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;xs:element</font><font size=2 color=#ff8141>
name=</font><font size=2 color=#a13f00>&quot;book&quot;</font><font size=2 color=#ff8141>
type=</font><font size=2 color=#a13f00>&quot;bookType&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#002f80>&lt;xs:element</font><font size=2 color=#ff8141>
name=</font><font size=2 color=#a13f00>&quot;chapter&quot;</font><font size=2 color=#ff8141>
type=</font><font size=2 color=#a13f00>&quot;chapterType&quot;</font><font size=2 color=#0000a1>/&gt;</font><font size=2><br>
<br>
</font><font size=2 color=#002f80>&lt;/xs:schema&gt;</font>
<br><font size=2 face="sans-serif">The first rule produces an error:</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Cannot
find a matching 1-argument function named {</font><a href="http://www.gdv-dl.de/"><font size=2 face="sans-serif">http://www.gdv-dl.de</font></a><font size=2 face="sans-serif">}test()</font>
<br><font size=2 face="sans-serif">So I have to extract the more complex
schematron-rules (those using xslt) into a separate schematron file? (Just
curious. This would be no problem.)</font>
<br>
<br><font size=2 face="sans-serif">The enhancement request sounds great.</font>
<br><font size=2 face="sans-serif">Just an idea: A less comfortable but
easier (=sooner?) to implement alternative might be to parse the xsl output
messages the same way you already parse the output of an external validator!?</font>
<br><font size=2 face="sans-serif"><br>
Thanks,<br>
<br>
Patrik<br>
<br>
------------------------------------------------------------------<br>
Systemarchitektur &amp; IT-Projekte<br>
Tel: +49 40 33449-1142<br>
Fax: +49 40 33449-1400<br>
E-Mail: patrik.stellmann@gdv-dl.de</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">George Cristian Bina
&lt;george@oxygenxml.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">An: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Patrik.Stellmann@gdv-dl.de</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Kopie: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">oxygen-user@oxygenxml.com</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">28.05.2013 10:31</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [oXygen-user]
Link xslt output messages to xml document</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Gesendet von: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">oxygen-user-bounces@oxygenxml.com</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi Patrick,<br>
<br>
oXygen's Schematron implementation is based on Skeleton and it allows <br>
adding XSLT functions/named templates in your Schematron file and these
<br>
will be copied to the XSLT that represents the compiled Schematron, thus
<br>
you can call them from your checks. You need to enable <br>
Options-&gt;Preferences -- XML / XML Parser / Schematron -- &quot;Allow
foreign <br>
elements&quot; to enable this functionality. You may want to explore if
this <br>
is enough to implement your checks in Schematron.<br>
<br>
We have an enhancement request logged on our issue tracking systenm to
<br>
define an XML language that should be interpreted by oXygen as a list of
<br>
results and displayed in the results area like we currently show the <br>
list of errors. If this will be generated by an XSLT stylesheet then we
<br>
will show the list of problems instead of the actual XML. But this is <br>
not available now...<br>
<br>
Though the XSLT message output you cannot do much I am afraid... you may
<br>
generate an XPath expression that matches the node with the problem and
<br>
put that in the message, then you can copy that and paste it in the <br>
XPath evaluation window to select that node.<br>
<br>
Best Regards,<br>
George<br>
--<br>
George Cristian Bina<br>
&lt;oXygen/&gt; XML Editor, Schema Editor and XSLT Editor/Debugger<br>
</font></tt><a href=http://www.oxygenxml.com/><tt><font size=2>http://www.oxygenxml.com</font></tt></a><tt><font size=2><br>
<br>
On 5/28/13 8:56 AM, Patrik.Stellmann@gdv-dl.de wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I would like to have my xslt output messages being linked to a node
of<br>
&gt; the processed xml document rather then to the xslt script - preferably<br>
&gt; even with a differentiation between warnings and errors.<br>
&gt; (The use-case is that my transformation scenario can detect several<br>
&gt; errors in the processed document that can hardly be covered by<br>
&gt; schema/schematron. So the author should be able to easily jump to
the<br>
&gt; position in the document to fix it.)<br>
&gt;<br>
&gt; I already managed to create a custom validation by calling saxon and<br>
&gt; passing the xslt script as argument. However, this is pretty slow
and<br>
&gt; doesn't feel being the right way.<br>
&gt;<br>
&gt; Thanks for any hints.<br>
&gt;<br>
&gt; Patrik Stellmann<br>
&gt;<br>
&gt; *GDV Dienstleistungs-GmbH &amp; Co. KG*<br>
&gt; Glockengießerwall 1<br>
&gt; D-20095 Hamburg<br>
&gt; </font></tt><a href="www.gdv-dl.de"><tt><font size=2>www.gdv-dl.de</font></tt></a><tt><font size=2><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; oXygen-user mailing list<br>
&gt; oXygen-user@oxygenxml.com<br>
&gt; </font></tt><a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user"><tt><font size=2>http://www.oxygenxml.com/mailman/listinfo/oxygen-user</font></tt></a><tt><font size=2><br>
&gt;<br>
_______________________________________________<br>
oXygen-user mailing list<br>
oXygen-user@oxygenxml.com<br>
</font></tt><a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user"><tt><font size=2>http://www.oxygenxml.com/mailman/listinfo/oxygen-user</font></tt></a><tt><font size=2><br>
</font></tt>
<br><p></p><p><strong>GDV Dienstleistungs-GmbH &amp; Co. KG</strong><br><span style="line-height: 1.22;">Glockengießerwall 1<br></span><span style="line-height: 1.22;">D-20095 Hamburg<br></span><span style="line-height: 1.22;">www.gdv-dl.de</span></p><p><span style="line-height: 1.22;">Sitz und Registergericht: Hamburg<br></span><span style="line-height: 1.22;">HRA 93 894<br></span><span style="line-height: 1.22;">USt.-IdNr : DE 205183123</span></p><p><span style="line-height: 1.22;">Komplementärin:<br></span><span style="line-height: 1.22;">GDV Beteiligungsgesellschaft mbH<br></span><span style="line-height: 1.22;">Sitz und Registergericht: Hamburg<br></span><span style="line-height: 1.22;">HRB 71 153</span></p><p><span style="line-height: 1.22;">Geschäftsführer:<br></span><span style="line-height: 1.22;">Volker Sonnenburg<br></span><span style="line-height: 1.22;">Heiko Beermann</span></p><p><span style="line-height: 1.22;">------------------------------------------------------------------<br></span><span style="line-height: 1.22;">Diese E-Mail und alle Anhänge enthalten vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.</span></p><p><span style="line-height: 1.22;">This e-mail and any attached files may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distributionof the material in this e-mail is strictly forbidden.</span></p><p></p>