[Bug 180] New: XmlSerializer: using entity references in attributes
[email protected] Thu, 18 Mar 2004 10:13:14 -0500 (EST)
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=180
Summary: XmlSerializer: using entity references in attributes
Product: XmlPull.org
Version: 1.1.2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Design
AssignedTo: [email protected]
ReportedBy: [email protected]
reported by Alfred Döblin
I'm using kXML to build a RDF/XML serializer, and have come across
some troubles as far as entity references in attributes is concerned.
Due to the extreme verbosity of RDF it's desirable to abbreviate the
namespace of uri-references by means of entities, for the sake of
legibility and performance; nonetheless it's been impossible for me to
achieve it in attributes, for the xml-pull serializer kindly decodes
escapable characters like '&', producing thus things like:
<?xml version='1.0' encoding='ISO-8859-1' standalone='yes' ?>
<!DOCTYPE rdf:RDF [
<!ENTITY ns0 "genid:">
<!ENTITY bp "http://www.beispiel.org/">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
]>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bp="http://www.beispiel.org/">
<rdf:Description rdf:about="http://www.beispiel.org/Haus">
<bp:besitzer rdf:resource="&bp;Karl" />
<bp:liegtIn rdf:resource="genid:urn:clerk:anon1" />
...
If anybody could explain me how to overcome this obstacle or use
the 'entityRef' method for an attribute I would be most grateful.
-----------------------------------------------------------------
Mmmm I'm afraid either I haven't explained it too well or you haven't
understood it thoroughly.
Yes, I'm aware that kXML ignores the doctype serialization during
parsing; however, I'm not using kXML for parsing but for serializing.
It does allow the programmer to create a doctype declaration, although
it doesn't offer a friendly way to create entities; that's a minor
matter all the same. The actual obstacle is to reference these
entities in attribute values, due to the replacement of escapable
characters kXML carries out.
Since we find ourselves in dire need, I will implement this feature.
I'm also likely to implement the stripping of entities from doctype
declaration, for I will be needing it later. In either case I will
share the code in this list, needless to say.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-bit SSL Security!
http://us.click.yahoo.com/LPJzrA/yjVHAA/TtwFAA/2U_rlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xmlpull-dev/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/