Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Started. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | xsdwhitespace |
Files: | files | file ages | folders |
SHA3-256: |
6c467a9d1f2fd72100f5b80879190c3e |
User & Date: | rolf 2020-06-13 15:09:22 |
Context
2020-06-22
| ||
00:38 | Mostly implemented. check-in: 3b1eb55264 user: rolf tags: xsdwhitespace | |
2020-06-13
| ||
15:09 | Started. check-in: 6c467a9d1f user: rolf tags: xsdwhitespace | |
2020-06-11
| ||
00:52 | Merged from trunk. check-in: f782953f52 user: rolf tags: schema | |
Changes
Changes to generic/schema.c.
5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 .... 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 .... 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 |
REMEMBER_PATTERN (pattern); Tcl_SetHashValue (h, pattern); } addToContent (sdata, pattern, quant, n, m); } else { /* Local definition of this element */ if (hnew) { pattern = initSchemaCP ( SCHEMA_CTYPE_NAME, sdata->currentNamespace, Tcl_GetHashKey (hashTable, h) ); pattern->flags |= PLACEHOLDER_PATTERN_DEF; REMEMBER_PATTERN (pattern); Tcl_SetHashValue (h, pattern); ................................................................................ checkNrArgs (2,2,"<tcl variable name>"); ADD_CONSTRAINT (sdata, sc) sc->constraint = setvarImpl; sc->freeData = setvarImplFree; sc->constraintData = tdomstrdup (Tcl_GetString (objv[1])); return TCL_OK; } void tDOM_SchemaInit ( Tcl_Interp *interp ) { Tcl_CreateObjCommand (interp, "tdom::schema", tDOM_SchemaObjCmd, ................................................................................ unsignedIntTypesTCObjCmd, (ClientData) 1, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::unsignedInt", unsignedIntTypesTCObjCmd, (ClientData) 2, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::unsignedLong", unsignedIntTypesTCObjCmd, (ClientData) 3, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::setvar", setvarTCObjCmd, (ClientData) 3, NULL); } #endif /* #ifndef TDOM_NO_SCHEMA */ |
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 .... 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 .... 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 |
REMEMBER_PATTERN (pattern); Tcl_SetHashValue (h, pattern); } addToContent (sdata, pattern, quant, n, m); } else { /* Local definition of this element */ if (hnew) { pattern = initSchemaCP( SCHEMA_CTYPE_NAME, sdata->currentNamespace, Tcl_GetHashKey (hashTable, h) ); pattern->flags |= PLACEHOLDER_PATTERN_DEF; REMEMBER_PATTERN (pattern); Tcl_SetHashValue (h, pattern); ................................................................................ checkNrArgs (2,2,"<tcl variable name>"); ADD_CONSTRAINT (sdata, sc) sc->constraint = setvarImpl; sc->freeData = setvarImplFree; sc->constraintData = tdomstrdup (Tcl_GetString (objv[1])); return TCL_OK; } typedef struct { char *buf; int allocedLen; } whitespaceTCData; static int whitespaceTCObjCmd ( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[] ) { SchemaData *sdata = GETASI; SchemaCP *cp; SchemaConstraint *sc; int rc; CHECK_TI checkNrArgs (3,3,"(\"preserve\"|\"replace\"|\"collapse\") " "<text constraint script>"); cp = initSchemaCP (SCHEMA_CTYPE_CHOICE, NULL, NULL); cp->type = SCHEMA_CTYPE_TEXT; REMEMBER_PATTERN (cp) switch (Tcl_GetString(objv[1])[0]) { case 'p': if (strcmp(Tcl_GetString (objv[0]), "preserve")) { checkNrArgs (3,3,"(\"preserve\"|\"replace\"|\"collapse\") " "<text constraint script>"); } rc = evalConstraints (interp, sdata, cp, objv[2]); if (rc == TCL_OK) { ADD_CONSTRAINT (sdata, sc) sc->constraint = checkText; sc->constraintData = (void *)cp; return TCL_OK; } return TCL_ERROR; break; case 'r': if (strcmp(Tcl_GetString (objv[0]), "replace")) { checkNrArgs (3,3,"(\"preserve\"|\"replace\"|\"collapse\") " "<text constraint script>"); } break; case 'c': if (strcmp(Tcl_GetString (objv[0]), "collapse")) { checkNrArgs (3,3,"(\"preserve\"|\"replace\"|\"collapse\") " "<text constraint script>"); } break; default: break; } ADD_CONSTRAINT (sdata, sc) sc->constraint = setvarImpl; sc->freeData = setvarImplFree; sc->constraintData = tdomstrdup (Tcl_GetString (objv[1])); return TCL_OK; } void tDOM_SchemaInit ( Tcl_Interp *interp ) { Tcl_CreateObjCommand (interp, "tdom::schema", tDOM_SchemaObjCmd, ................................................................................ unsignedIntTypesTCObjCmd, (ClientData) 1, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::unsignedInt", unsignedIntTypesTCObjCmd, (ClientData) 2, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::unsignedLong", unsignedIntTypesTCObjCmd, (ClientData) 3, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::setvar", setvarTCObjCmd, (ClientData) 3, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text:whitespace", whitespaceTCObjCmd, (ClientData) 3, NULL); } #endif /* #ifndef TDOM_NO_SCHEMA */ |