Skip to content

xml:* and xlink:* attributes are unconstrained strings in mx::core #398

Description

@webern

The generator passes attributes from xml.xsd and xlink.xsd through as std::string. Those schemas constrain the values, so invalid values are representable.

Five types need validators:

Attribute Pattern Schema
xml:lang xs:language pattern, or empty docs/xml.xsd:79
xml:space default, preserve docs/xml.xsd:89
xlink:type simple, extended, title, resource, locator, arc docs/xlink.xsd:32
xlink:show new, replace, embed, other, none docs/xlink.xsd:73
xlink:actuate onLoad, onRequest, other, none docs/xlink.xsd:85

Current representation: src/private/mx/core/generated/FormattedText.h:83,
AccidentalText.h:90, Link.h:57-61. 21 attribute sites total.

xlink:href, xlink:role, and @source are xs:anyURI, which accepts nearly any string.
std::string is correct there.

Related: #397.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsoftware defectcoreAffects the mx::core layergenThe gen/ directory which is generating code from the specnon-breakingfixes or implementation that do not require breaking changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions