[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Retrieving "markup" hidden in comments

Subject: RE: Retrieving "markup" hidden in comments
From: AAS Contractor <AAS.Contractor@xxxxxxx>
Date: Fri, 29 Jun 2007 13:19:13 +0100
RE:  Retrieving "markup" hidden in comments
Thanks to both Mike and Abel for providing the answer. That extension had 
passed me by. I think such a function could be a useful addition to the 
spec.

cheers,

Bruce



"Michael Kay" <mike@xxxxxxxxxxxx> 
28/06/2007 16:50
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
<xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
cc

Subject
RE:  Retrieving "markup" hidden in comments






The saxon:parse() extension function allows you to extract the content of
the comment and parse it as if it were an XML document.

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: AAS Contractor [mailto:AAS.Contractor@xxxxxxx] 
> Sent: 28 June 2007 16:38
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Retrieving "markup" hidden in comments
> 
> 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&amp;lt;M<INF>V</INF>&amp;lt;-14.9</F></F
> ORMULA>-->
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.