Re: Prevent expansion of defaulted attributes

On Thu, Nov 3, 2011 at 3:28 AM, Peet Kester <peetkes@gmail.com> wrote:
> Hi list,
>
> how can I prevent the expansion of defaulted attributes when I do an identity step in xproc?
> I have xml files which need to be processed and when I process the xml files I see that the defaulted attributes are expanded in the output.
> My xml files have a doctype definition pointing to a specific dtd with the defaulted attributes.

That's the normal behavior for XML.  The parser is providing those
attribute values to Calabash per the XML recommendation.  While the
XML Infoset [1] preserves this information via the [specified] flag,
the XDM [2] does not.  As Calabash uses the XDM internally, the
serializer can't do much about it.

If you don't want them in the output, you'll need to add a step before
serialization that removed the defaulted values.

[1] http://www.w3.org/TR/xml-infoset/
[2] http://www.w3.org/TR/xpath-datamodel/#infoset-mapping-attribute

-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Saturday, 5 November 2011 16:29:48 UTC