I've always wanted to know if there's a right way to do that myself. I've resorted to using sed to obfuscate the entities before processing, then unobfuscating them afterwards. For each file,
 
sed "s/&\(\w*\.*\w*\);/%%\1%%/g" $file > $file.tmp1.xml
 
the run the xsl on the file, then
 
sed "s/%%\(\w*\.*\w*\)%%/\&\1;/g" $file.tmp2.xml > $file
 
It seems like such a hack--there must be a better way.
 
David
-----Original Message-----
From: Jeff Beal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 10:48 AM
To: DocBook Mailing List (E-mail)
Subject: DOCBOOK-APPS: Keeping entities in a transformation

I’m working an an XSL script to clean up my DocBook XML.  I’m running into problems because all of the entities are declared in a top-level driver file, and the content resides in about 3,000 external entities, which do not include DOCTYPE declarations.  I need to maintain our current file structure and naming scheme (which unfortunately does not correspond directly to the XML.).

 

How can I get the XSL process to “ignore” undeclared entities and copy the reference through to the result tree?

 

Jeff Beal

Ansys, Inc.

(724)514-3150

[EMAIL PROTECTED]

 

Reply via email to