% $Id: XMLSchemaString.lsl,v 1.2 1999/11/05 23:19:13 ht Exp $
%

References

  1. XML Schema Part 1: Structures
    internal draft: Id: structures.xml,v 1.13.1.15 1999/10/26 16:23:30 ht Exp

XMLSchemaString: trait
    includes
        XMLInfoSet,
        Integer,
        RegExp(Char for Symbol, List[Char] for String, RegEx for Exp)

        OptPosInt union of null: Null, value: Int %@@ there must be a better way
        OptRegEx union of null: Null, value: RegEx %@@ there must be a better way

        StringAIT tuple of
            pattern: OptRegEx,
            length: OptPosInt,
            maxLength: OptPosInt

    introduces
        string_is_string: List[Char], StringAIT ® Bool

    asserts
        "
            sst: StringAIT

            (((tag(sst.length) = null) Ú (tag(sst.maxLength) = null))
             Ù ((tag(sst.length)=value) Þ (sst.length.value > 0))
             Ù ((tag(sst.maxLength)=value) Þ (sst.maxLength.value > 0)))

        "
            string: List[Char],
            sst: StringAIT

            ((tag(sst.length) = null
                   Ú len(string) = sst.length.value)
                Ù
                (tag(sst.maxLength) = null
                   Ú len(string) <= sst.maxLength.value)
               Ù
                (tag(sst.pattern) = null
                   Ú string Î L(sst.pattern.value)))

[Index]

[source]


HTML generated using lsl2html.