OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Endtag attributes

[ Lists Home | Date Index | Thread Index ]
  • From: Arthur Rother <arthur.rother@ovidius.com>
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 12 Nov 1998 14:39:44 +0100

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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS