From: Casey J. <cas...@jo...> - 2012-10-30 13:58:16
|
HI all I was interested to know if anyone had found a method to allow customization of publishing via XQuery the same way you can with XSLT. Essentially, the ability to drop new "templates" in that can change default output. I've been wanting to move our publishing off xslt for a while now, but not being able to do this has been preventing me from accomplish it. I have been thinking maybe annotations would provide the capability. For instance: (: Provide a custom template to match an image without an @src :) declare %pub:match('img[not(@src)]') function custom:image-proc($node ) { element{"img"}{ $node/@*, attribute{"warn"}{"Image missing src"}, pub:dispatch($node) (: Dispatch processing to child nodes. IE: apply-templates :) } } Thanks, Casey -- -- Casey Jordan easyDITA a product of Jorsek LLC "CaseyDJordan" on LinkedIn, Twitter & Facebook (585) 348 7399 easydita.com This message is intended only for the use of the Addressee(s) and may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, please be advised that any disclosure copying, distribution, or use of the information contained herein is prohibited. If you have received this communication in error, please destroy all copies of the message, whether in electronic or hard copy format, as well as attachments, and immediately contact the sender by replying to this e-mail or by phone. Thank you. |