[Bug 4834] targetXXX attributes and sml:refType

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4834

           Summary: targetXXX attributes and sml:refType
           Product: SML
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: cmsmcq@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: public-sml@w3.org


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.

Received on Thursday, 5 July 2007 02:29:01 UTC