On 12/7/05, Tommy Skarateppen <developer(_at_)docstream(_dot_)no> wrote:
I have this file generated from Adobe FrameMaker:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE journal SYSTEM "mydtd.dtd" [
<!-- Begin Document Specific Declarations -->
<?Fm Validation Off?>
<!ENTITY bkc1 SYSTEM "beta-8-2004-journalfront-1.ent">
<!ENTITY bkc2 SYSTEM "beta-8-2004-2.ent">
<!ENTITY bkc3 SYSTEM "beta-8-2004-journalback-3.ent">
<!-- End Document Specific Declarations -->
]>
<?Fm Book?><journal>&bkc1;&bkc2;&bkc3;</journal>
The entity names are automatically generated from FrameMaker, but I want
to have them changed, so the output file would look something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE journal SYSTEM "mydtd.dtd" [
<!-- Begin Document Specific Declarations -->
<?Fm Validation Off?>
<!ENTITY beta-8-2004-journalfront-1.ent SYSTEM
"beta-8-2004-journalfront-1.ent"> <!ENTITY
beta-8-2004-journalfront-2.ent SYSTEM "beta-8-2004-2.ent"> <!ENTITY
beta-8-2004-journalfront-3.ent SYSTEM "beta-8-2004-journalback-3.ent">
<!-- End Document Specific Declarations -->
]>
<?Fm
Book?><journal>&beta-8-2004-journalfront-1.ent;&beta-8-2004-journalfront
-2.ent;&beta-8-2004-journalfront-3.ent;</journal>
Is this possible to do in XSLT?
No, all entity definitions are resolved by the XML parser before XSLT
gets involved. A text editor should give you the ability to do a
search and replace in files (UltraEdit for example).
cheers
andrew
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--