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.
RE: Use of XLST to clean up MadCap HTML; RE: Unadulterated Flare HTML/XML output
Subject:RE: Use of XLST to clean up MadCap HTML; RE: Unadulterated Flare HTML/XML output From:"Porrello, Leonard" <lporrello -at- illumina -dot- com> To:'Richard L Hamilton' <dick -at- rlhamilton -dot- net>, "techwr-l -at- lists -dot- techwr-l -dot- com" <techwr-l -at- lists -dot- techwr-l -dot- com> Date:Tue, 9 Aug 2011 20:39:40 +0000
Thank you!
-----Original Message-----
From: techwr-l-bounces+lporrello=illumina -dot- com -at- lists -dot- techwr-l -dot- com [mailto:techwr-l-bounces+lporrello=illumina -dot- com -at- lists -dot- techwr-l -dot- com] On Behalf Of Richard L Hamilton
Sent: Monday, August 08, 2011 5:14 PM
To: techwr-l -at- lists -dot- techwr-l -dot- com
Subject: Re: Use of XLST to clean up MadCap HTML; RE: Unadulterated Flare HTML/XML output
Leonard,
You're right that, in general, you're going to have trouble using XSLT on HTML files. However, the example you included is XHTML, which you can handle with XSLT. Here's a quick try at a stylesheet that will remove any MadCap prefixed elements or attributes (I'm not guaranteeing anything, but it worked on your example below):
1) You will either need to have the schema for MadCap available, or choose a no-validation option on your xsl processor (the latter is easier and reasonably safe, since I suspect Flare generates clean XML). For xsltproc, you would use the --novalid option.
2) This stylesheet leaves in the MadCap namespace declaration, even though the namespace doesn't occur in the result. There's probably a way to get rid of it, but I don't know off-hand how to do that. If it's important, you can always strip it out by hand or using something like perl.
Hope that helps.
Richard Hamilton
-------
XML Press
New from XML Press:
The Secret Life of Word: A Professional Writer's Guide to Microsoft Word Automation http://xmlpress.net/publications/word-secrets
On Aug 8, 2011, at 2:26 PM, Porrello, Leonard wrote:
Create and publish documentation through multiple channels with Doc-To-Help.
Choose your authoring formats and get any output you may need. Try
Doc-To-Help, now with MS SharePoint integration, free for 30-days. http://www.doctohelp.com
---
You are currently subscribed to TECHWR-L as lporrello -at- illumina -dot- com -dot-
Create and publish documentation through multiple channels with Doc-To-Help.
Choose your authoring formats and get any output you may need. Try
Doc-To-Help, now with MS SharePoint integration, free for 30-days. http://www.doctohelp.com
---
You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-