This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4834 - targetXXX attributes and sml:refType
Summary: targetXXX attributes and sml:refType
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P1 normal
Target Milestone: Second draft
Assignee: Valentina Popescu
QA Contact: SML Working Group discussion list
URL:
Whiteboard: SML references
Keywords: editorial
Depends on: 4673
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-05 02:28 UTC by Sandy Gao
Modified: 2007-09-05 18:20 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2007-07-05 02:28:59 UTC
What happens if targetXXX attributes are used with element declarations whose type is not derived from sml:refType?

One answer is to say it's an error, because targetXXX can only be used on references, and sml:refType is used to indicate whether a type is a reference. Then using targetXXX on other types would have no meaning.

Another answer is to allow such usage. Whether an element instance is a reference or not depends solely on whether it has sml:ref="true" attribute, which is independent of the schema type. (If the schema type has a reference to sml:ref, or has an attribute wildcard, then the instance can always have such an attribute.) Then a schema author may want to impose targetXXX constraints on such elements even when their types are not derived from refType.

This question arises because of the asymmetry between how instances identify references and how schema identifies them (i.e. sml:ref attribute vs. sml:refType complex type). So another possible to the above question may be to harmonize these 2.
Comment 1 Pratul Dublish 2007-09-05 04:58:59 UTC
We have decided to remove sml:refType and taregtXXX constrainst can be defined on any element declarations. 
Comment 2 Valentina Popescu 2007-09-05 18:20:30 UTC
Files changed :

sample-model-source.xsd
sml-source.xsd
sml-source.xml

Changes :
1. Removed sml:refType definition and documentation from schema and spec
2. Updated all samples referring to sml:refType by adding a new type that mirrors the sml:refType definition
3. Replaced all occurences of : 'aa must be supported on sml:refType and its derived types' with 'aa must be supported on all element declarations'