Skip to content

"/" inside the pattern disables the "Submit" button #20

@antonielly

Description

@antonielly

The generator available at
https://xsd-forms.herokuapp.com/
creates a form whose "Submit" button does not work when the "pattern" of a string-derived element contains "/".

Minimal working examples:

a) The defect appears:

<?xml version="1.0" encoding="utf-8" ?>
<schema xmlns:this="http://example.com/"
    targetNamespace="http://example.com/"
    xmlns="http://www.w3.org/2001/XMLSchema">

    <simpleType name="NonNegativeFraction">
        <restriction base="string">
            <pattern value="[0-9]+/[0-9]+"/>
        </restriction>
    </simpleType>

    <element name="nonNegativeFraction" type="this:NonNegativeFraction"/>
</schema>

b) The defect does not appear (i.e. it works correctly, as it should):

<?xml version="1.0" encoding="utf-8" ?>
<schema xmlns:this="http://example.com/"
    targetNamespace="http://example.com/"
    xmlns="http://www.w3.org/2001/XMLSchema">

    <simpleType name="NonNegativeFraction">
        <restriction base="string">
            <pattern value="[0-9]+[/][0-9]+"/>
        </restriction>
    </simpleType>

    <element name="nonNegativeFraction" type="this:NonNegativeFraction"/>
</schema>

Both examples comply with the XSD structural rules according to tools such as Oxygen XML Editor.

Tested with Mozilla Firefox 41.0.2 on Microsoft Windows 7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions