Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Added the xsd data types Name, NCName and QName as text constraint commands name, ncname and qname. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | schema |
Files: | files | file ages | folders |
SHA3-256: |
3201b746cc6487eed16f8a048f3cd32e |
User & Date: | rolf 2019-11-24 01:07:51 |
Context
2019-11-29
| ||
00:29 | Added the xsd data types negativeInteger, nonNegativeInteger, nonPositiveInteger and positiveInteger. check-in: d3fc207059 user: rolf tags: schema | |
2019-11-24
| ||
01:07 | Added the xsd data types Name, NCName and QName as text constraint commands name, ncname and qname. check-in: 3201b746cc user: rolf tags: schema | |
2019-11-22
| ||
23:54 | Added validation of the included tmml xml documentation against the included tmml.schema as test. check-in: 2bee8a3462 user: rolf tags: schema | |
Changes
Changes to doc/schema.xml.
605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
</commanddef> <commanddef> <command><cmd>nmtokens</cmd></command> <desc>This text constraint match if the text value match the XML nmtokens production <url>https://www.w3.org/TR/xml/#NT-Nmtokens</url></desc> </commanddef> <commanddef> <command><cmd>number</cmd> <m>?(xsd|tcl)?</m></command> <desc>This text constraint match if the text value could be parsed as a number. If the optional argument to the command is <m>tcl</m> everthing that returns TCL_OK if feeded into Tcl_GetDouble() matches. If the optional argument to the command is <m>xsd</m> then the constraint match if the value is a |
> > > > > > > > > > > > > > > > > > > > > > > > > > > |
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
</commanddef> <commanddef> <command><cmd>nmtokens</cmd></command> <desc>This text constraint match if the text value match the XML nmtokens production <url>https://www.w3.org/TR/xml/#NT-Nmtokens</url></desc> </commanddef> <commanddef> <command><cmd>name</cmd></command> <desc>This text constraint match if the text value match the XML name production <url>https://www.w3.org/TR/xml/#NT-Name</url>. This means the text value must start with a letter, underscore (_), or colon (:), and may contain only letters, digits, underscores (_), colons (:), hyphens (-), and periods (.).</desc> </commanddef> <commanddef> <command><cmd>ncname</cmd></command> <desc>This text constraint match if the text value match the XML ncname production <url>https://www.w3.org/TR/xml-names/#NT-NCName</url>. This means the text value must start with a letter or underscore (_), and may contain only letters, digits, underscores (_), hyphens (-), and periods (.) (The only difference to the name constraint is that colons are not permitted.)</desc> </commanddef> <commanddef> <command><cmd>qname</cmd></command> <desc>This text constraint match if the text value match the XML qname production <url>https://www.w3.org/TR/xml-names/#NT-QName</url>. This means the text value is either a ncname or two ncnames joined by a colon (:).</desc> </commanddef> <commanddef> <command><cmd>number</cmd> <m>?(xsd|tcl)?</m></command> <desc>This text constraint match if the text value could be parsed as a number. If the optional argument to the command is <m>tcl</m> everthing that returns TCL_OK if feeded into Tcl_GetDouble() matches. If the optional argument to the command is <m>xsd</m> then the constraint match if the value is a |
Changes to generic/schema.c.
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
....
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
|
CHECK_TI
CHECK_TOPLEVEL
checkNrArgs (1,1,"No arguments expected");
ADD_CONSTRAINT (sdata, sc)
sc->constraint = base64Impl;
return TCL_OK;
}
void
tDOM_SchemaInit (
Tcl_Interp *interp
)
{
Tcl_CreateObjCommand (interp, "tdom::schema", tDOM_SchemaObjCmd,
................................................................................
idrefTCObjCmd, NULL, NULL);
Tcl_CreateObjCommand (interp,"tdom::schema::text::base64",
base64TCObjCmd, NULL, NULL);
Tcl_CreateObjCommand (interp,"tdom::schema::text::key",
keyTCObjCmd, NULL, NULL);
Tcl_CreateObjCommand (interp,"tdom::schema::text::keyref",
keyrefTCObjCmd, NULL, NULL);
}
#endif /* #ifndef TDOM_NO_SCHEMA */
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
....
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
|
CHECK_TI CHECK_TOPLEVEL checkNrArgs (1,1,"No arguments expected"); ADD_CONSTRAINT (sdata, sc) sc->constraint = base64Impl; return TCL_OK; } static int nameImpl ( Tcl_Interp *interp, void *constraintData, char *text ) { return domIsNAME (text); } static int nameTCObjCmd ( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[] ) { SchemaData *sdata = GETASI; SchemaConstraint *sc; CHECK_TI CHECK_TOPLEVEL checkNrArgs (1,1,"No arguments expected"); ADD_CONSTRAINT (sdata, sc) sc->constraint = nameImpl; return TCL_OK; } static int ncnameImpl ( Tcl_Interp *interp, void *constraintData, char *text ) { return domIsNCNAME (text); } static int ncnameTCObjCmd ( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[] ) { SchemaData *sdata = GETASI; SchemaConstraint *sc; CHECK_TI CHECK_TOPLEVEL checkNrArgs (1,1,"No arguments expected"); ADD_CONSTRAINT (sdata, sc) sc->constraint = ncnameImpl; return TCL_OK; } static int qnameImpl ( Tcl_Interp *interp, void *constraintData, char *text ) { return domIsQNAME (text); } static int qnameTCObjCmd ( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[] ) { SchemaData *sdata = GETASI; SchemaConstraint *sc; CHECK_TI CHECK_TOPLEVEL checkNrArgs (1,1,"No arguments expected"); ADD_CONSTRAINT (sdata, sc) sc->constraint = qnameImpl; return TCL_OK; } void tDOM_SchemaInit ( Tcl_Interp *interp ) { Tcl_CreateObjCommand (interp, "tdom::schema", tDOM_SchemaObjCmd, ................................................................................ idrefTCObjCmd, NULL, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::base64", base64TCObjCmd, NULL, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::key", keyTCObjCmd, NULL, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::keyref", keyrefTCObjCmd, NULL, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::name", nameTCObjCmd, NULL, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::ncname", ncnameTCObjCmd, NULL, NULL); Tcl_CreateObjCommand (interp,"tdom::schema::text::qname", qnameTCObjCmd, NULL, NULL); } #endif /* #ifndef TDOM_NO_SCHEMA */ |