Subject: [xsl] Retrieving "markup" hidden in comments From: AAS Contractor <AAS.Contractor@xxxxxxx> Date: Thu, 28 Jun 2007 16:38:05 +0100 |
Hi, I'm using XSLT 2.0 with Saxon 8B. My problem is: I have xml files which contain Arbortext Math markup which has been placed in comments, e.g. <!--<FORMULA><F>-21.6&lt;M<INF>V</INF>&lt;-14.9</F></FORMULA>--> The reason being that the math markup is not valid according to the DTD being used. I have no control over this. However, I want to be able to process this "hidden" markup as if it were real elements. I can retrieve the comment text string, but of course that's all it is - a string. Is there any way to coerce that into being treated as an element or document-node? I can achieve the effect I want by writing the content of each comment out to a file (using a character map or disable-output-escaping) and read them in again on a second pass. This works, but is rather messy, and I'd rather do it in one pass. Is there a way to emulate the effect of document() but on the content of a variable rather than a file? Other than that, I guess the other option is to write a parser for the math markup in xslt, which I'd rather not have to do :-( Thanks for any suggestions. Regards, Bruce ************************************************************************ This email (and attachments) are confidential and intended for the addressee(s) only. If you are not the intended recipient please notify the sender, delete any copies and do not take action in reliance on it. Any views expressed are the author's and do not represent those of IOP, except where specifically stated. IOP takes reasonable precautions to protect against viruses but accepts no responsibility for loss or damage arising from virus infection. For the protection of IOP's systems and staff emails are scanned automatically. IOP Publishing Limited Registered in England under Registration No 467514. Registered Office: Dirac House, Temple Back, Bristol BS1 6BE England Vat No GB 461 6000 84.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] another hierarchical prob, Michael Kay | Thread | Re: [xsl] Retrieving "markup" hidde, Abel Braaksma |
RE: [xsl] another hierarchical prob, Michael Kay | Date | Re: [xsl] Retrieving "markup" hidde, Abel Braaksma |
Month |