Endtag attributes
Arthur Rother
arthur.rother at ovidius.com
Thu Nov 12 19:41:33 GMT 1998
Isn't there a much simpler solution, with which
you can avoid end tag attributes with just
one pass over the input document.
The way to go is maybe using dynamical generated entities.
When creating the output stream, generate a header like:
<!DOCTYPE whatever PUBLIC "whoever"
[
...
<!ENTITY % attrdecl SYSTEM "attrdecl.ent">
%attrdecl;
]>
Then, for each element needing an endtag attribute 'attr', do
for each starttag encountered
<elem attr="&elem_2_3_4_attr" ... >
Last thing, for each endtag encountered, corresponding to the
starttag found, do:
(pseudo c command)
writeto("attrdecl.ent","<!ENTITY elem_2_3_4_attr \"value\">\n");
where value is the value, you originally wanted to assign to the endtag
attribute.
The entity for the attribute name has to be unique ofcourse. This is
achieved by using some kind of a tumbler id in the entity name. One could
ofcourse also use a running counter.
In the next processor, the entities are resolved.
-arthur
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list