W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2011

Re: Prevent expansion of defaulted attributes

From: Alex Milowski <alex@milowski.org>
Date: Fri, 4 Nov 2011 11:26:45 -0700
Message-ID: <CABp3FN+w9HrezYzrp+fiJUa9Zj6bmgZvabv4VuJZ3mKsk+-e+A@mail.gmail.com>
To: xproc-dev@w3c.org
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

Bertrand Russell in a footnote of Principles of Mathematics
Received on Saturday, 5 November 2011 16:29:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:09 UTC