[DDI-SRG] "fixed" implementation question
J Gager
j.b.gager at gmail.com
Wed Dec 5 16:35:57 EST 2007
It is my opion that anything that would want to know this information would
probably be schema aware. I can't imagine something that is complex enough
to care wheter an individulal artefacts are maintainable or versionable not
validating the XML first.
We have used fixed attributes in numerous XML implementations and it has
never come up as an issue.
The DDI is very complex, and secondary validation is most likely required
for any useful application. I don't think creating the standard against the
lowest level of tools is the right design decision.
But that is just my 2 cents.
J
_____
From: ddi-srg-bounces at icpsr.umich.edu
[mailto:ddi-srg-bounces at icpsr.umich.edu] On Behalf Of I-Lin Kuo
Sent: Wednesday, December 05, 2007 4:12 PM
To: DDI Technical Implementation Committee
Subject: [DDI-SRG] "fixed" implementation question
HI all,
In Wendy's TIC report email, I saw a couple of lines using fixed, e.g.
"@isMaintainable fixed="true"".
I just want to check that it's not being implemented in the obvious way,
<xs:attribute name="isMaintainable " type="xs:string" fixed="true"/>
Implementing it this way would be a very bad idea, in my opinion.
Implemented this way, the @isMaintainable may be omitted in an instance
document and yet validate against the schema. When this instance is
processed, the attribute isMaintainable is visible only when you are
processing in a schema-aware fashion. Most XSLT engines and streaming
processors are not schema aware. The end result is that the results of
applying an XSLT stylesheet to an instance will differ, depending on whether
the stylesheet is run with a schema-aware processor or an unaware processor.
I recommend the following implementation:
<xs:attribute name="isMaintainable " type="ddi:fixed" required="true"/>
where ddi:fixed is defined to be "true", restricting xs:string.
--
I-Lin Kuo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.icpsr.umich.edu/pipermail/ddi-srg/attachments/20071205/822f6081/attachment.html
More information about the DDI-SRG
mailing list