TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Many thanks! I will give this a shot. Actually I think I can do much the same with a couple of keystrokes using my favourite coderly text editor, but having an XSLT is far more elegant and sustainable.
I appreciate the quick (re-)introduction to XSLT, it has been some years since I used it.
Best
Michael
From: "mbaker -at- analecta -dot- com" <mbaker -at- analecta -dot- com>
Date: Tuesday, August 23, 2016 at 8:57 PM
To: Michael Hopwood <Michael -dot- Hopwood -at- Gleif -dot- org>, TECHWR-L <techwr-l -at- lists -dot- techwr-l -dot- com>
Subject: RE: Generic XSLTs for extracting / hiding documentation embedded in XML?
To process the rest of the content while suppressing the xs:documentation and xs:annotation tags, create a stylesheet that contains the following templates:
<xs:template match="xs:documentation"/>
<xs:template match="xs:annotation"/>
And then import the stylesheet that normally processes the content. Process your content with this new stylesheet. The two templates above will suppress any processing of those elements that the normal stylesheets do while otherwise processing it in exactly the same way they always did.
The latter is untested.
Hope this helps,
Mark
-----Original Message-----
From: techwr-l-bounces+mbaker=analecta -dot- com -at- lists -dot- techwr-l -dot- com [mailto:techwr-l-bounces+mbaker=analecta -dot- com -at- lists -dot- techwr-l -dot- com] On Behalf Of Michael Hopwood
Sent: Tuesday, August 23, 2016 11:50 AM
To: TECHWR-L <techwr-l -at- lists -dot- techwr-l -dot- com>
Subject: Generic XSLTs for extracting / hiding documentation embedded in XML?
Hello all,
I hope this is not too much of a niche question, but I imagine many of you are far more seasoned oXygen users than I am.
Iâm writing documentation into an XML schema using xs:annotation and xs:documentation and oXygen outputs that beautifully.
Now, if I want to just extract the content of the xs:documentation tags as plain text for an ad-hoc use e.g. pasting into a Word doc that can be reviewed, commented etc.?
Conversely, if Iâd like to generate just the outer XML without any xs:annotation and xs:documentation tags?
Would it be too optimistic to think that there might be some tried and tested XML stylesheets available for these purposes? I donât see this being technically intractable. Just asking before I reinvent this wheel.
Global Legal Entity Identifier Foundation (GLEIF) BÃumleingasse 22, 4051, Basel, Switzerland Chairman of the Board: Gerard Hartsink
CEO: Stephan Wolf
This message may contain confidential and/or privileged information. If you are not the intended recipient or if you have received this message in error, please notify the sender and delete this message. Any unauthorised copying, disclosure or distribution of this message is strictly forbidden.
Looking for articles on Technical Communications? Head over to our online magazine at http://techwhirl.com
Looking for the archived Techwr-l email discussions? Search our public email archives @ http://techwr-l.com/archives
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Visit TechWhirl for the latest on content technology, content strategy and content development | http://techwhirl.com