[oXygen-user] Feature request: Validation for linked images in SVG paths

Alex Jitianu alex_jitianu at sync.ro
Tue Jul 30 02:24:42 CDT 2013


Hello  Matt,

In Oxygen v15.0 we've added in the "Validate and check for Completeness" 
dialog a new entry called "Additional schematron checks" 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:

<?xml version="1.0" encoding="UTF-8"?>
<schema
     xmlns="http://purl.oclc.org/dsdl/schematron"
     queryBinding="xslt2"
     xmlns:exslt="http://expath.org/ns/file">
     <ns uri="http://expath.org/ns/file" prefix="exslt"/>
     <pattern>
         <rule context="image[ends-with(@href, '.svg')]">
             <let name="svgDocument" value="document(@href)" />
             <assert 
test="exslt:exists(resolve-uri($svgDocument//*:image/@*:href, 
base-uri($svgDocument)))">
                 The image file from the following SVG doesn't exist: 
<value-of select="base-uri($svgDocument)"/></assert>
         </rule>
     </pattern>
</schema>

Best regards,
Alex
-- 
Alex Jitianu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


On 29-Jul-13 9:38 PM, KAATMAN Matthew wrote:
>
> Hey Guys,
>
> This is a feature request that's not extremely crucial, but it would 
> be helpful for us.
>
> I'm having our authors create SVG overlays and link to the background 
> image (jpeg or png).
>
> Sometimes they accidentally link to an image that isn't in our 
> repository path.
>
> Within the SVG, I'll end up with something like:
>
> <image width="1200" height="1807" 
> xlink:href="../../../../../../../Users/Username/Pictures/PREVI 
> PAV/PAV_printer_cover_open.jpg"  >
>
> When it should be:
>
> <image width="1200" height="1807" 
> xlink:href="images/PAV_printer_cover_open.jpg"  >
>
> 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.
>
> 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.
>
> Example:
>
> Thanks!
> Matt
>
> 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.
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20130730/e5d7b116/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 8037 bytes
Desc: not available
Url : http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20130730/e5d7b116/attachment-0001.png 


More information about the oXygen-user mailing list