Feature to store entityreferences in attribute values when building a DOM
-------------------------------------------------------------------------
Key: XERCESJ-1225
URL: https://issues.apache.org/jira/browse/XERCESJ-1225
Project: Xerces2-J
Issue Type: Improvement
Components: DOM (Level 3 Core)
Affects Versions: 2.9.0
Reporter: Dick Deneer
Priority: Minor
Using the parameter
"http://apache.org/xml/features/dom/create-entity-ref-nodes" you can store the
entity references which belong to element values. But entity references in
attribute values are not stored in the DOM. This makes it impossible to
serialize the DOM back to the original xml. Please supply a similar feature for
entity references in attribute values as implemented for elements. Especially
in the case where you are using the DOM for updating other values , you need
this.
Example:
Parse this xml to a DOM
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE personnel SYSTEM "personal.dtd" [
<!ENTITY name "Big">
<!ENTITY one "1">
]>
<personnel>
<person id="Big.Boss" salary="&one;">
<name><family>Boss</family> <given>&name;</given></name>
<email>[EMAIL PROTECTED]</email>
</person>
</personnel>
In the DOM you will have a entity referece node for &name as child for <given>
There will be no entity reference node for &one in salary
After serializing back to xml you will get:
<?xml version="1.0" ?>
<!DOCTYPE personnel SYSTEM "personal.dtd" [<!ENTITY name 'Big'>
<!ENTITY one '1'>
]>
<personnel>
<person id="Big.Boss" salary="1">
<name>
<family>Boss</family>
<given>&name;</given>
</name>
<email>[EMAIL PROTECTED]</email>
</person>
Implementing this feature will also need changes in the serializer, to get the
stored entities out in the XML
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]