[DDI-SRG] "fixed" implementation question
I-Lin Kuo
ikuoikuo at gmail.com
Wed Dec 5 16:12:04 EST 2007
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/c6032601/attachment.html
More information about the DDI-SRG
mailing list