Subject: [xsl] Re: Tracking entity references From: "Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 28 Mar 2023 10:27:44 -0000 |
Hi Frank, My understanding is that entities are resolved by the XML parser itself, so once you're at the point where the content is ready to be queried, the source of the content is lost. It's yucky, but maybe you could globally search-and-replace a copy of the files to add processing instructions just before each entity reference? * Chris From: Wegmann, Frank frank.wegmann@xxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, March 28, 2023 6:23 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Tracking entity references This may be a very silly question, but I couldn't find an answer on it, with Saxon, or outside it, using tools relying on expat. Use case is a set of old XML documents (traditional, inhouse DTD) that make overly excessive use of entities of all kinds. While it is easy to get all entity declarations, and also to locate references of external entities, I could not locate references of text entities. By the time I see it the entity reference has already been resolved. How can I achieve that (ideally with line/column of the actual place in the original file or entity)? I very much hope that I just overlooked something here... Thanks, Frank Wegmann Software AG Software AG - Sitz/Registered office: Uhlandstra_e 12, 64297 Darmstadt, Germany - Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/Management Board: Sanjay Brahmawar (Vorsitzender/Chairman), Daniela B|nger, Joshua Husk, Dr. Benno Quade, Dr. Stefan Sigg - Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Christian Lucas - https://www.softwareag.com <https://urldefense.com/v3/__https:/www.softwareag.com__;!!A4F2R9G_pg!a_xGrIl 9G7DmZem8CCemylMb_MA-AbtXQVfmOFQv2cih86gdUpF7MaY2XSsqexGhxkUtVwULRNQuAxHjV9G7 UR8t-k8CNKrlQlCYYI4mcROWzeQDRcf_$> XSL-List info and archive<https://urldefense.com/v3/__http:/www.mulberrytech.com/xsl/xsl-list__ ;!!A4F2R9G_pg!a_xGrIl9G7DmZem8CCemylMb_MA-AbtXQVfmOFQv2cih86gdUpF7MaY2XSsqexG hxkUtVwULRNQuAxHjV9G7UR8t-k8CNKrlQlCYYI4mcROWzaPViOD6$> EasyUnsubscribe<https://urldefense.com/v3/__http:/lists.mulberrytech.com/unsu b/xsl-list/3380743__;!!A4F2R9G_pg!a_xGrIl9G7DmZem8CCemylMb_MA-AbtXQVfmOFQv2ci h86gdUpF7MaY2XSsqexGhxkUtVwULRNQuAxHjV9G7UR8t-k8CNKrlQlCYYI4mcROWzZebLS9r$> (by email<>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Tracking entity references, Wegmann, Frank frank | Thread | Re: [xsl] Tracking entity reference, Michael Kay mike@xxx |
[xsl] Tracking entity references, Wegmann, Frank frank | Date | Re: [xsl] Tracking entity reference, Michael Kay mike@xxx |
Month |