Home Forums General XMetaL Discussion Resolve entity reference by code Reply To: Resolve entity reference by code

S. Strube

Reply to: Resolve entity reference by code

Yes, I'm talking about text entities and I mean to extract the value defined.

The use case is an authoring assistance we have, which queries the sentence the user currently writes in a database to find same and similar sentences as a suggestion for auto completion and consistent writing.

To do this, we're indexing the CMS texts with resolved text entities in the database – means without entities like &productName;. So I need to query these sentences in the same manner.

I'd also would have expected nodeValue to be the value of the entity, but as you've written the example does not work.

Current workaround is to use an external process that reads the DTD URL from the active document, creates an XML document from the fragment in the selected range and passes this through an XML reader to resolve the entities.

and I have nothing better to offer at the moment

Hence I think we need to stick with the workaround for this.
Please notify me, if you find a beter in-app / API solution for this.

Reply

Products
Downloads
Support