Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix possible subtile bug. Simplified a bit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | expected-onlymandatory
Files: files | file ages | folders
SHA3-256: 37f071d9e07919fac0ad30ce30c5261054a658df073f7a7bcfd658b2b51ad22a
User & Date: rolf 2020-05-02 00:39:50
Context
2020-05-02
00:41
Merge the blunder in without documentation. check-in: a88689ecce user: rolf tags: schema
00:39
Fix possible subtile bug. Simplified a bit. Closed-Leaf check-in: 37f071d9e0 user: rolf tags: expected-onlymandatory
2020-05-01
21:59
#Small doc addendum. check-in: 3bc0aa5169 user: rolf tags: expected-onlymandatory
Changes

Changes to generic/schema.c.

1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
....
3772
3773
3774
3775
3776
3777
3778

3779
3780
3781
3782
3783

3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
                hm = 0;
                continue;
            }
            if (!mayskip && mustMatch (cp->quants[ac], hm)) {
                if (recover (interp, sdata, MISSING_ELEMENT_MATCH_START, name,
                             namespace, NULL, ac)) {
                    if (sdata->recoverFlags & RECOVER_FLAG_IGNORE) {
                        /* We pretend the ac content particel had
                         * matched. */
                        updateStack (sdata, se, ac);
                    }
                    return 1;
                }
                return 0;
            }
................................................................................
    case SCHEMA_CTYPE_NAME:
    case SCHEMA_CTYPE_PATTERN:
        while (ac < cp->nc) {
            if (se->interleaveState
                && se->interleaveState[ac]
                && maxOne (cp->quants[ac])) {
                ac++;

                continue;
            }
            if (expectedFlags & EXPECTED_ONLY_MANDATORY
                && mayMiss (cp->quants[ac])) {
                ac++;

                continue;
            }
            ic = cp->content[ac];
            mayskip = 0;
            switch (ic->type) {
            case SCHEMA_CTYPE_NAME:
                if (probeMayskip) break;
                if (!(expectedFlags & EXPECTED_ONLY_MANDATORY)
                    || minOne (cp->quants[ac])) {
                    Tcl_ListObjAppendElement (
                        interp, rObj, serializeElementName (interp, ic)
                        );
                }
                break;
            case SCHEMA_CTYPE_PATTERN:
                if (recursivePattern (se, ic)) {
                    break;
                }
                /* Fall through */
            case SCHEMA_CTYPE_INTERLEAVE:







|







 







>



|

>







<
<
|
|
<
<







1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
....
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792


3793
3794


3795
3796
3797
3798
3799
3800
3801
                hm = 0;
                continue;
            }
            if (!mayskip && mustMatch (cp->quants[ac], hm)) {
                if (recover (interp, sdata, MISSING_ELEMENT_MATCH_START, name,
                             namespace, NULL, ac)) {
                    if (sdata->recoverFlags & RECOVER_FLAG_IGNORE) {
                        /* We pretend the ac content particle had
                         * matched. */
                        updateStack (sdata, se, ac);
                    }
                    return 1;
                }
                return 0;
            }
................................................................................
    case SCHEMA_CTYPE_NAME:
    case SCHEMA_CTYPE_PATTERN:
        while (ac < cp->nc) {
            if (se->interleaveState
                && se->interleaveState[ac]
                && maxOne (cp->quants[ac])) {
                ac++;
                hm = 0;
                continue;
            }
            if (expectedFlags & EXPECTED_ONLY_MANDATORY
                && !(mustMatch (cp->quants[ac], hm))) {
                ac++;
                hm = 0;
                continue;
            }
            ic = cp->content[ac];
            mayskip = 0;
            switch (ic->type) {
            case SCHEMA_CTYPE_NAME:
                if (probeMayskip) break;


                Tcl_ListObjAppendElement (interp, rObj,
                                          serializeElementName (interp, ic));


                break;
            case SCHEMA_CTYPE_PATTERN:
                if (recursivePattern (se, ic)) {
                    break;
                }
                /* Fall through */
            case SCHEMA_CTYPE_INTERLEAVE: