<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Angsana New";
        panose-1:2 2 6 3 5 4 5 2 3 4;}
@font-face
        {font-family:"Cordia New";
        panose-1:2 11 3 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cordia New";
        panose-1:2 11 3 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It works great. Thanks Alex and Wendell!<br>Matt<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Wendell Piez [mailto:wapiez@wendellpiez.com] <br><b>Sent:</b> Wednesday, July 31, 2013 8:16 AM<br><b>To:</b> KAATMAN Matthew<br><b>Cc:</b> oxygen-user@oxygenxml.com<br><b>Subject:</b> Re: [oXygen-user] Feature request: Validation for linked images in SVG paths<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>Matt,<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Oops, sorry about that $t, it was a relic of an earlier iteration. It should be . (dot).<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>I just started with Alex's code, reworked and reworked again. (Compulsive activity after a long day of XSLT/XQuery/XPath.) There is certain to be other tuning necessary for your case.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Cheers, Wendell<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><div><div><p class=MsoNormal>Wendell Piez | <a href="http://www.wendellpiez.com" target="_blank">http://www.wendellpiez.com</a><br>XML | XSLT | electronic publishing<br>Eat Your Vegetables<br>_____oo_________o_o___ooooo____ooooooo_^<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>On Tue, Jul 30, 2013 at 11:36 PM, KAATMAN Matthew &lt;<a href="mailto:matthew.kaatman@biomerieux.com" target="_blank">matthew.kaatman@biomerieux.com</a>&gt; wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hey Wendell,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am learning from all these examples. $t is undefined. Would you mind clarifying what it should be set to?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks!<br>Matt</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:oxygen-user-bounces@oxygenxml.com" target="_blank">oxygen-user-bounces@oxygenxml.com</a> [mailto:<a href="mailto:oxygen-user-bounces@oxygenxml.com" target="_blank">oxygen-user-bounces@oxygenxml.com</a>] <b>On Behalf Of </b>Wendell Piez<br><b>Sent:</b> Tuesday, July 30, 2013 6:20 PM</span><o:p></o:p></p><div><div><p class=MsoNormal><br><b>To:</b> <a href="mailto:oxygen-user@oxygenxml.com" target="_blank">oxygen-user@oxygenxml.com</a><br><b>Subject:</b> Re: [oXygen-user] Feature request: Validation for linked images in SVG paths<o:p></o:p></p></div></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi,<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Schematron is not only useful; it's fun. (I admit I am hard-core.)<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Refactoring a little (but untested):<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>&lt;let name=&quot;referencedImages&quot; value=&quot;$svgDocument//*:image/@*:href[not(starts-with(.,'data'))]&quot;/&gt;</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>&lt;let name=&quot;missingImages&quot; value=&quot;$referencedImages[not(exslt:exists(resolve-uri($t, base-uri($svgDocument))))]&quot;/&gt;</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>&lt;assert test=&quot;empty($missingImages)&quot;&gt;An image file referenced in SVG image &lt;value-of select=&quot;@href&quot;/&gt; is missing:</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>&nbsp; check for &lt;value-of select=&quot;string-join($missingImages,', ')&quot;/&gt;&lt;/assert&gt;</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Thanks to Alex for doing the real work.</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Cheers, Wendell</span><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br clear=all><o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Wendell Piez | <a href="http://www.wendellpiez.com" target="_blank">http://www.wendellpiez.com</a><br>XML | XSLT | electronic publishing<br>Eat Your Vegetables<br>_____oo_________o_o___ooooo____ooooooo_^<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>&nbsp;<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Tue, Jul 30, 2013 at 10:35 AM, Alex Jitianu &lt;<a href="mailto:alex_jitianu@sync.ro" target="_blank">alex_jitianu@sync.ro</a>&gt; wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hello Matt,<br><br>1. The odd line is related to the fact that when validating with a Schematron file under the hood the Schematron is transformed in XSLT and that XSLT is applied on the document. The reported error line is inside that intermediate XSLT and unfortunately I don't think there is a round trip to get the real location in the Schematron file.<br><br>2. I believe the NullPointerException is a side effect of the fact that I didn't consider the fact that the SVG file is also referred relatively in the DITA document. As a result the SVG will not get located and parsed by the document() function and later on exists() function will break. In the example below I've added the resolve-uri() function to compute the SVG document location.<br><br>3. In the example below I've changed a bit the assert XPath to ignore the href values that start with 'data'. You should also take into account the fact that the SVG can contain multiple image elements. Perhaps you could assert it more elegantly than this but here a possible solution:<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br><br>&lt;schema <br>&nbsp;&nbsp;&nbsp; xmlns=<a href="http://purl.oclc.org/dsdl/schematron" target="_blank">&quot;http://purl.oclc.org/dsdl/schematron&quot;</a> <br>&nbsp;&nbsp;&nbsp; queryBinding=&quot;xslt2&quot;<br>&nbsp;&nbsp;&nbsp; xmlns:exslt=<a href="http://expath.org/ns/file" target="_blank">&quot;http://expath.org/ns/file&quot;</a>&gt;<br>&nbsp;&nbsp;&nbsp; &lt;ns uri=<a href="http://expath.org/ns/file" target="_blank">&quot;http://expath.org/ns/file&quot;</a> prefix=&quot;exslt&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;pattern&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;rule context=&quot;image&quot;&gt;<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;let name=&quot;svgDocument&quot; value=&quot;document(resolve-uri(@href, base-uri()))&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;let name=&quot;svgExists&quot; value=&quot;exists($svgDocument)&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assert test=&quot;$svgExists&quot;&gt;The SVG file can't be loaded &lt;value-of select=&quot;resolve-uri(@href, base-uri())&quot;/&gt;&lt;/assert&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;let name=&quot;realImages&quot; value=&quot;$svgDocument//*:image/@*:href&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- If the SVG file can't be loaded or the SVG points to an embeded image SKIP IT. --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;let name=&quot;testImages&quot; value=&quot;for $realImage in $realImages return if (not($svgExists) or starts-with($realImage, 'data')) then true() else exslt:exists(resolve-uri($realImage, base-uri($svgDocument)))&quot;/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assert test=&quot;empty(index-of($testImages, false()))&quot;&gt;The image file must exist&lt;/assert&gt;<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/rule&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/pattern&gt;<br>&lt;/schema&gt;<br><br>Best regards,<br>Alex<o:p></o:p></p></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On 30-Jul-13 3:33 PM, KAATMAN Matthew wrote:<o:p></o:p></p></div></div></div><div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Hey Alex,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>This looks really promising!</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>When I run validate with this schematron I get the following:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>System ID: C:\svn\scripts\svgCheck.sch</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Engine name: ISO Schematron (XSLT 2.0)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Severity: fatal</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Type: XML validation</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Start location: 149:0 <span style='background:yellow'>(Odd because the schematron is only 14 lines)</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>System ID: C:\dita\pt\products\vitek2systems\pi\Appendix_A.dita <span style='background:yellow'>(This is the first file with an SVG for the document I checked.)</span></span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Engine name: ISO Schematron (XSLT 2.0)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Severity: error</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Description: Exception thrown by extension function {public static boolean com.saxonica.functions.extfn.EXPathFile.exists(java.lang.String)}: java.lang.NullPointerException</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Type: XML validation</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Even if I delete all SVG references, I receive the above two errors.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>I then tried it on a map with more SVGs and some that were verified to be broken. It is properly detecting the errors but I see false positives when the SVG contains embedded images instead of linked. I believe it’s trying to verify the binary data as the uri.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>System ID: C:\dita\en\products\simon\service\Attachments.dita</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Engine name: ISO Schematron (XSLT 2.0)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Severity: error</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Description: A sequence of more than one item is not allowed as the first argument of resolve-uri() (&quot;data:image/jpeg;base64,/9j/4AA...&quot;, &quot;data:image/png;base64,iVBORw0K...&quot;) </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Type: XML validation</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Is there a way for me to adjust the schematron to ignore href values that start with “data”?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>I had previously attended a webinar Oxygen presented on schematron. I’m finally starting to understand how powerful it can be!</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>Thank you,<br>Matt</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:oxygen-user-bounces@oxygenxml.com" target="_blank">oxygen-user-bounces@oxygenxml.com</a> [<a href="mailto:oxygen-user-bounces@oxygenxml.com" target="_blank">mailto:oxygen-user-bounces@oxygenxml.com</a>] <b>On Behalf Of </b>Alex Jitianu<br><b>Sent:</b> Tuesday, July 30, 2013 2:25 AM<br><b>To:</b> <a href="mailto:oxygen-user@oxygenxml.com" target="_blank">oxygen-user@oxygenxml.com</a><br><b>Subject:</b> Re: [oXygen-user] Feature request: Validation for linked images in SVG paths</span><o:p></o:p></p></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hello&nbsp; Matt,<br><br>In Oxygen v15.0 we've added in the &quot;Validate and check for Completeness&quot; dialog a new entry called &quot;Additional schematron checks&quot; in which you can specify additional Schematron checks that should be be executed on the topics. You can perform the check you've described using a Schematron file with the following content:<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;schema <br>&nbsp;&nbsp;&nbsp; xmlns=<a href="http://purl.oclc.org/dsdl/schematron" target="_blank">&quot;http://purl.oclc.org/dsdl/schematron&quot;</a> <br>&nbsp;&nbsp;&nbsp; queryBinding=&quot;xslt2&quot;<br>&nbsp;&nbsp;&nbsp; xmlns:exslt=<a href="http://expath.org/ns/file" target="_blank">&quot;http://expath.org/ns/file&quot;</a>&gt;<br>&nbsp;&nbsp;&nbsp; &lt;ns uri=<a href="http://expath.org/ns/file" target="_blank">&quot;http://expath.org/ns/file&quot;</a> prefix=&quot;exslt&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &lt;pattern&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;rule context=<a href="mailto:image[ends-with%28@href,%27.svg%27%29]" target="_blank">&quot;image[ends-with(@href, '.svg')]&quot;</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;let name=&quot;svgDocument&quot; value=&quot;document(@href)&quot; /&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assert test=&quot;exslt:exists(resolve-uri($svgDocument//*:image/@*:href, base-uri($svgDocument)))&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The image file from the following SVG doesn't exist: &lt;value-of select=&quot;base-uri($svgDocument)&quot;/&gt;&lt;/assert&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/rule&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/pattern&gt;<br>&lt;/schema&gt;<br><br>Best regards,<br>Alex<br>-- <br>Alex Jitianu<br>&lt;oXygen/&gt;&nbsp; XML Editor, Schema Editor and XSLT Editor/Debugger<br><a href="http://www.oxygenxml.com" target="_blank">http://www.oxygenxml.com</a><br><br><br>On 29-Jul-13 9:38 PM, KAATMAN Matthew wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p>Hey Guys,<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>This is a feature request that's not extremely crucial, but it would be helpful for us.<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>I'm having our authors create SVG overlays and link to the background image (jpeg or png).<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>Sometimes they accidentally link to an image that isn't in our repository path.<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>Within the SVG, I'll end up with something like:<o:p></o:p></p><p>&lt;image width=&quot;1200&quot; height=&quot;1807&quot; xlink:href=&quot;../../../../../../../Users/Username/Pictures/PREVI PAV/PAV_printer_cover_open.jpg&quot;&nbsp; &gt;<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>When it should be:<o:p></o:p></p><p>&lt;image width=&quot;1200&quot; height=&quot;1807&quot; xlink:href=&quot;images/PAV_printer_cover_open.jpg&quot;&nbsp; &gt;<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>Although, the validate/check for completeness wouldn't catch this on their workstation as the image exists and is valid, it would find it quickly on mine since it's outside the path that gets checked in and I’d be missing that image.<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>It doesn't seem like the OT throws any errors either. The only way I find out is when I'm viewing the PDF and notice that antenna house has substituted a broken image.<o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>Example:<o:p></o:p></p><p><o:p></o:p></p><p>&nbsp;<o:p></o:p></p><p>Thanks!<br>Matt<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>AVIS : Ce courrier et ses pieces jointes sont destines a leur seul destinataire et peuvent contenir des informations confidentielles appartenant a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute lecture, divulgation, ou reproduction de ce message et des pieces jointes est strictement interdite. Si vous avez recu ce message par erreur merci d'en prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes. NOTICE: This message and attachments are intended only for the use of their addressee and may contain confidential information belonging to bioMerieux. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately and delete this message, along with any attachments. <o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>oXygen-user mailing list<o:p></o:p></pre><pre><a href="mailto:oXygen-user@oxygenxml.com" target="_blank">oXygen-user@oxygenxml.com</a><o:p></o:p></pre><pre><a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><o:p></o:p></pre></blockquote><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>AVIS : Ce courrier et ses pieces jointes sont destines a leur seul destinataire et peuvent contenir des informations confidentielles appartenant a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute lecture, divulgation, ou reproduction de ce message et des pieces jointes est strictement interdite. Si vous avez recu ce message par erreur merci d'en prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes. NOTICE: This message and attachments are intended only for the use of their addressee and may contain confidential information belonging to bioMerieux. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately and delete this message, along with any attachments. <o:p></o:p></p></blockquote><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><br>_______________________________________________<br>oXygen-user mailing list<br><a href="mailto:oXygen-user@oxygenxml.com" target="_blank">oXygen-user@oxygenxml.com</a><br><a href="http://www.oxygenxml.com/mailman/listinfo/oxygen-user" target="_blank">http://www.oxygenxml.com/mailman/listinfo/oxygen-user</a><o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div></div></div></div><div><div><p class=MsoNormal>AVIS : Ce courrier et ses pieces jointes sont destines a leur seul destinataire et peuvent contenir des informations confidentielles appartenant a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute lecture, divulgation, ou reproduction de ce message et des pieces jointes est strictement interdite. Si vous avez recu ce message par erreur merci d'en prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes. NOTICE: This message and attachments are intended only for the use of their addressee and may contain confidential information belonging to bioMerieux. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately and delete this message, along with any attachments. <o:p></o:p></p></div></div></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></div></div>AVIS : Ce courrier et ses pieces jointes sont destines a leur seul destinataire et peuvent contenir des informations confidentielles appartenant a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute lecture, divulgation, ou reproduction de ce message et des pieces jointes est strictement interdite. Si vous avez recu ce message par erreur merci d'en prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes.
NOTICE: This message and attachments are intended only for the use of their addressee and may contain confidential information belonging to bioMerieux. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately and delete this message, along with any attachments.

</body></html>