schema2template.model
public interface QNamedPuzzleComponent extends QNamed, PuzzleComponent
Modifier and Type | Method and Description |
---|---|
boolean |
isMandatory(QNamedPuzzleComponent child)
ELEMENT Definition only: Determine solely by child type and name
whether child is mandatory.
|
getLocalName, getNamespace, getQName
canHaveText, getAttributes, getChildElements, getCollection, getDatatypes, getParents, getType, getValues, isSingleton
boolean isMandatory(QNamedPuzzleComponent child)
Here's why we're not using the child Definition object(s) for this: An element often has a mandatory attribute, but two (or more) different content definitions for this attribute. This is done by defining this attribute twice and creating a CHOICE between both Definitions. If you'd ask whether one of these definitions is mandatory, you'd always get false as answer as you have the choice between the two definitions. Mostly this is not the answer you're looking for.
Contract: If 'this' is a Collection, mandatory means mandatory for one member of 'this'.
child
- The child Definition(s) of type ELEMENT or ATTRIBUTECopyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.