Re: retaining entity declarations while converting fro
> NDATA ccitt4"> ^^^^ ^^^^ ^^^^ ^^^^ ^^^^ As i said in my inital reply, I suspected that you were using NDATA entities. Despite the fact that your example code did not use this form. This completely changes the question as while it's true that you lose the declarations, you do not (unlike a normal parsed entity) lose the entity references. > I need to retain those in my intermediate output. By far the simplest way, if you can control the source, is not to do this <!DOCTYPE example[ <!ENTITY t1 SYSTEM "image.tif" NDATA ccitt4"> ]> <example> .... but instead do this <!DOCTYPE example SYSTEM "images.ent"> <example> .... images.ent containing <!ENTITY t1 SYSTEM "image.tif" NDATA ccitt4"> then you can use <xsl:output doctype-system="images.ent"/> and the same declaration is used for both input and output. But if you really do need to dynamically detect which declarations are usied in the source you need to either read the source as text using unparsed-text() and extract the DOCTYPE or use an extension function or modified parser that passes on doctype information via some mechanism. The XDM model used by XPath/XSLT to model the input document has no record of the DOCTYPE used. Andrew's lexev might be able to do this, I coudn't tell from the web page whether it reported entity declarations in teh local subset of the dtd or only reported teh public and system ids. David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format