Lists Home |
Date Index |
I finally found out the answer to my question about defaulting of attribute
values and overriding the defaults in a higher level element after a bit of
digging into the SAX2 API.
Turns out the SAX2 Extensions specification (which Xerces supports) provides
an alternative implementation of the Attributes interface, called Attributes2.
Included in this extension is a method called isSpecified() that returns true if
the attribute was actually specified in the tag rather than defaulting from a
This is exactly what I need for the semantics I want to use in GPSml. By being
able to determine whether an attribute was actually specified or defaulted, I
can then take action to use a higher level default in the appropriate case (eg.
Higher level default WAS specified, but lower level attribute was defaulted).
Awesome! This makes the structure of GPSml more "intuitive" and "natural" in
Thought I would pass this on since no-one else seemed to know the answer.
Might save others some research.
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions