Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merged from trunk. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | domvalidation |
Files: | files | file ages | folders |
SHA3-256: |
6a48682b06b058e70536691cd6a3a2c4 |
User & Date: | rolf 2018-12-14 09:54:21.016 |
Context
2019-06-06
| ||
23:23 | Merged from trunk. check-in: 672fc9ca28 user: rolf tags: domvalidation | |
2018-12-14
| ||
09:54 | Merged from trunk. check-in: 6a48682b06 user: rolf tags: domvalidation | |
2018-11-22
| ||
00:13 | Removed unnecessary code. The handler pair for start and end tag is enough for bookkeeping about nesting. check-in: 22bb3a056f user: rolf tags: trunk | |
2018-07-25
| ||
23:12 | Merged from trunk. check-in: d554f9574e user: rolf tags: domvalidation | |
Changes
Changes to CHANGES.
1 2 3 4 5 6 7 | 2018-07-16 Rolf Ade <[email protected]> The package name is tDOM, but it always has been requested by [package require tdom] and now the scripted helper commands in tdom.tcl are also in the namespace tdom (not anymore in tDOM). The new pullparser command is now also in this namespace. There are aliases from the old command names to the new one, | > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 2018-10-12 Rolf Ade <[email protected]> Updated to expat 2.2.6. 2018-08-08 Rolf Ade <[email protected]> Changed the license to MPL 2.0. --- Release 0.9.1, 24. Jul. 2018 --- 2018-07-16 Rolf Ade <[email protected]> The package name is tDOM, but it always has been requested by [package require tdom] and now the scripted helper commands in tdom.tcl are also in the namespace tdom (not anymore in tDOM). The new pullparser command is now also in this namespace. There are aliases from the old command names to the new one, |
︙ | ︙ |
Changes to LICENSE.
1 2 3 | The tDOM specific source files come with the Mozilla Public License | | < < < | 1 2 3 4 5 6 7 | The tDOM specific source files come with the Mozilla Public License Version 2.0. For Expat XML parser package license look into the directory expat. |
Added MPL_2.0.html.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> <title>Mozilla Public License, version 2.0</title> <!--[if lt IE 9]> <script src="/media/js/libs/html5shiv.42594ff91377.js"></script> <![endif]--> <link href="/media/css/BUNDLES/mpl-2-0.e529fc4408b6.css" rel="stylesheet" type="text/css" /> </head> <body> <h1 id="mozilla-public-license-version-2.0">Mozilla Public License<br>Version 2.0</h1> <h2 id="definitions">1. Definitions</h2> <dl> <dt>1.1. “Contributor”</dt> <dd><p>means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.</p> </dd> <dt>1.2. “Contributor Version”</dt> <dd><p>means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution.</p> </dd> <dt>1.3. “Contribution”</dt> <dd><p>means Covered Software of a particular Contributor.</p> </dd> <dt>1.4. “Covered Software”</dt> <dd><p>means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.</p> </dd> <dt>1.5. “Incompatible With Secondary Licenses”</dt> <dd><p>means</p> <ol type="a"> <li><p>that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or</p></li> <li><p>that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.</p></li> </ol> </dd> <dt>1.6. “Executable Form”</dt> <dd><p>means any form of the work other than Source Code Form.</p> </dd> <dt>1.7. “Larger Work”</dt> <dd><p>means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.</p> </dd> <dt>1.8. “License”</dt> <dd><p>means this document.</p> </dd> <dt>1.9. “Licensable”</dt> <dd><p>means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.</p> </dd> <dt>1.10. “Modifications”</dt> <dd><p>means any of the following:</p> <ol type="a"> <li><p>any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or</p></li> <li><p>any new file in Source Code Form that contains any Covered Software.</p></li> </ol> </dd> <dt>1.11. “Patent Claims” of a Contributor</dt> <dd><p>means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.</p> </dd> <dt>1.12. “Secondary License”</dt> <dd><p>means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.</p> </dd> <dt>1.13. “Source Code Form”</dt> <dd><p>means the form of the work preferred for making modifications.</p> </dd> <dt>1.14. “You” (or “Your”)</dt> <dd><p>means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.</p> </dd> </dl> <h2 id="license-grants-and-conditions">2. License Grants and Conditions</h2> <h3 id="grants">2.1. Grants</h3> <p>Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:</p> <ol type="a"> <li><p>under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and</p></li> <li><p>under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.</p></li> </ol> <h3 id="effective-date">2.2. Effective Date</h3> <p>The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.</p> <h3 id="limitations-on-grant-scope">2.3. Limitations on Grant Scope</h3> <p>The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:</p> <ol type="a"> <li><p>for any code that a Contributor has removed from Covered Software; or</p></li> <li><p>for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or</p></li> <li><p>under Patent Claims infringed by Covered Software in the absence of its Contributions.</p></li> </ol> <p>This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).</p> <h3 id="subsequent-licenses">2.4. Subsequent Licenses</h3> <p>No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).</p> <h3 id="representation">2.5. Representation</h3> <p>Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.</p> <h3 id="fair-use">2.6. Fair Use</h3> <p>This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.</p> <h3 id="conditions">2.7. Conditions</h3> <p>Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.</p> <h2 id="responsibilities">3. Responsibilities</h2> <h3 id="distribution-of-source-form">3.1. Distribution of Source Form</h3> <p>All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form.</p> <h3 id="distribution-of-executable-form">3.2. Distribution of Executable Form</h3> <p>If You distribute Covered Software in Executable Form then:</p> <ol type="a"> <li><p>such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and</p></li> <li><p>You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License.</p></li> </ol> <h3 id="distribution-of-a-larger-work">3.3. Distribution of a Larger Work</h3> <p>You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).</p> <h3 id="notices">3.4. Notices</h3> <p>You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.</p> <h3 id="application-of-additional-terms">3.5. Application of Additional Terms</h3> <p>You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.</p> <h2 id="inability-to-comply-due-to-statute-or-regulation">4. Inability to Comply Due to Statute or Regulation</h2> <p>If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.</p> <h2 id="termination">5. Termination</h2> <p>5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.</p> <p>5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.</p> <p>5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.</p> <h2 id="disclaimer-of-warranty">6. Disclaimer of Warranty</h2> <p><em>Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.</em></p> <h2 id="limitation-of-liability">7. Limitation of Liability</h2> <p><em>Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.</em></p> <h2 id="litigation">8. Litigation</h2> <p>Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims.</p> <h2 id="miscellaneous">9. Miscellaneous</h2> <p>This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.</p> <h2 id="versions-of-the-license">10. Versions of the License</h2> <h3 id="new-versions">10.1. New Versions</h3> <p>Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.</p> <h3 id="effect-of-new-versions">10.2. Effect of New Versions</h3> <p>You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.</p> <h3 id="modified-versions">10.3. Modified Versions</h3> <p>If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).</p> <h3 id="distributing-source-code-form-that-is-incompatible-with-secondary-licenses">10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses</h3> <p>If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.</p> <h2 id="exhibit-a---source-code-form-license-notice">Exhibit A - Source Code Form License Notice</h2> <blockquote> <p>This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.</p> </blockquote> <p>If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.</p> <p>You may add additional accurate notices of copyright ownership.</p> <h2 id="exhibit-b---incompatible-with-secondary-licenses-notice">Exhibit B - “Incompatible With Secondary Licenses” Notice</h2> <blockquote> <p>This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.</p> </blockquote> </body> </html> |
Changes to Makefile.in.
︙ | ︙ | |||
203 204 205 206 207 208 209 | all: binaries libraries doc #======================================================================== # TDOM enabled shell is build as an extra directive, since non TEA. #======================================================================== | | | | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | all: binaries libraries doc #======================================================================== # TDOM enabled shell is build as an extra directive, since non TEA. #======================================================================== $(TDOMSHELL): binaries $(srcdir)/unix/tclAppInit.c $(COMPILE) -c `@CYGPATH@ $(srcdir)/unix/tclAppInit.c` $(CC) @LDFLAGS@ -o $@ tclAppInit.$(OBJEXT) $(PKG_OBJECTS) \ $(TCL_LIB_SPEC) $(TDOMSHELL_LIBS) $(TDOM_LD_SEARCH_FLAGS) #======================================================================== # The binaries target builds executable programs, Windows .dll's, unix # shared/static libraries, and any other platform-dependent files. # The list of targets to build for "binaries:" is specified at the top # of the Makefile, in the "BINARIES" variable. #======================================================================== binaries: $(top_builddir)/versionhash.h $(BINARIES) libraries: #======================================================================== # Your doc target should differentiate from doc builds (by the developer) # and doc installs (see install-doc), which just install the docs on the # end user machine when building from source. |
︙ | ︙ | |||
344 345 346 347 348 349 350 | genstubs: $(srcdir)/generic/tdom.decls $(TCLSH_PROG) $(TCL_SRC_DIR)/tools/genStubs.tcl $(srcdir)/generic \ $(srcdir)/generic/tdom.decls #======================================================================== # Create a include file that #define the current fossil hash #======================================================================== | | | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | genstubs: $(srcdir)/generic/tdom.decls $(TCLSH_PROG) $(TCL_SRC_DIR)/tools/genStubs.tcl $(srcdir)/generic \ $(srcdir)/generic/tdom.decls #======================================================================== # Create a include file that #define the current fossil hash #======================================================================== $(top_builddir)/versionhash.h: $(srcdir)/manifest.uuid @echo "#define FOSSIL_HASH \"" | tr -d '\n\r' > $(top_builddir)/versionhash.h @cat $(srcdir)/manifest.uuid | tr -d '\n\r' >> $(top_builddir)/versionhash.h @echo "\"" >> $(top_builddir)/versionhash.h tcldom.o: $(srcdir)/generic/tcldom.c $(top_builddir)/versionhash.h #======================================================================== |
︙ | ︙ | |||
387 388 389 390 391 392 393 | $(DIST_DIR)/tclconfig/ # Extension files $(DIST_INSTALL_DATA) \ $(srcdir)/CHANGES \ $(srcdir)/ChangeLog \ $(srcdir)/LICENSE \ | | | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | $(DIST_DIR)/tclconfig/ # Extension files $(DIST_INSTALL_DATA) \ $(srcdir)/CHANGES \ $(srcdir)/ChangeLog \ $(srcdir)/LICENSE \ $(srcdir)/MPL_2.0.html \ $(srcdir)/README \ $(srcdir)/README.AOL \ $(srcdir)/manifest \ $(srcdir)/manifest.uuid \ $(srcdir)/tdomConfig.sh.in \ $(srcdir)/tdom.m4 \ $(srcdir)/pkgIndex.tcl.in \ |
︙ | ︙ |
Deleted NPL-1_1Final.html.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to README.
1 2 3 | tDOM - a XML/DOM/XPath/XSLT/HTML/JSON implementation for Tcl | | | 1 2 3 4 5 6 7 8 9 10 11 | tDOM - a XML/DOM/XPath/XSLT/HTML/JSON implementation for Tcl (Version 0.9.2) This directory contains a freely distributable thread-safe extension to Tcl/Tk called tDOM. tDOM contains: |
︙ | ︙ |
Changes to README.AOL.
1 2 3 | tDOM - a XML/DOM/XPath/XSLT implementation for Tcl | | | 1 2 3 4 5 6 7 8 9 10 11 | tDOM - a XML/DOM/XPath/XSLT implementation for Tcl (Version 0.9.2) Jochen Loewer ([email protected]) Rolf Ade ([email protected]) with some contributions by: Zoran Vasiljevic ([email protected]) |
︙ | ︙ |
Changes to apps/xslt.tcl.
1 2 3 4 5 6 7 8 9 10 11 | #---------------------------------------------------------------------------- # Copyright (c) 1999-2001 Jochen Loewer ([email protected]) #---------------------------------------------------------------------------- # # $Id$ # # # A simple command line XSLT processor using tDOMs XSLT engine. # # # The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #---------------------------------------------------------------------------- # Copyright (c) 1999-2001 Jochen Loewer ([email protected]) #---------------------------------------------------------------------------- # # $Id$ # # # A simple command line XSLT processor using tDOMs XSLT engine. # # # The contents of this file are subject to the Mozilla Public License # Version 2.0 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations # under the License. |
︙ | ︙ |
Changes to configure.
1 2 | #! /bin/sh # Guess values for system-dependent variables and create Makefiles. | | | 1 2 3 4 5 6 7 8 9 10 | #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for tdom 0.9.2. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. |
︙ | ︙ | |||
573 574 575 576 577 578 579 | subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tdom' PACKAGE_TARNAME='tdom' | | | | 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tdom' PACKAGE_TARNAME='tdom' PACKAGE_VERSION='0.9.2' PACKAGE_STRING='tdom 0.9.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> #ifdef HAVE_SYS_TYPES_H |
︙ | ︙ | |||
1305 1306 1307 1308 1309 1310 1311 | # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF | | | 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 | # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures tdom 0.9.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. |
︙ | ︙ | |||
1366 1367 1368 1369 1370 1371 1372 | cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in | | | 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 | cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of tdom 0.9.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
︙ | ︙ | |||
1478 1479 1480 1481 1482 1483 1484 | cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF | | | 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 | cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF tdom configure 0.9.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit |
︙ | ︙ | |||
1756 1757 1758 1759 1760 1761 1762 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. | | | 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tdom $as_me 0.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { |
︙ | ︙ | |||
9360 9361 9362 9363 9364 9365 9366 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" | | | 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by tdom $as_me 0.9.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ |
︙ | ︙ | |||
9413 9414 9415 9416 9417 9418 9419 | Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ | | | 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 | Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ tdom config.status 0.9.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." |
︙ | ︙ |
Changes to configure.ac.
︙ | ︙ | |||
15 16 17 18 19 20 21 | # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION # set as provided. These will also be added as -D defs in your Makefile # so you can encode the package version directly into the source files. # This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME> # so that we create the export library with the dll. #----------------------------------------------------------------------- | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION # set as provided. These will also be added as -D defs in your Makefile # so you can encode the package version directly into the source files. # This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME> # so that we create the export library with the dll. #----------------------------------------------------------------------- AC_INIT([tdom], [0.9.2]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. #-------------------------------------------------------------------- |
︙ | ︙ |
Changes to doc/dom.html.
︙ | ︙ | |||
586 587 588 589 590 591 592 | <dd>Returns the version of the underlyling expat version as string, something like "exapt_2.1.0". This is what the expat API function XML_ExpatVersion() returns.</dd> <dt><b>expatmajorversion</b></dt> | | | | | | | | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | <dd>Returns the version of the underlyling expat version as string, something like "exapt_2.1.0". This is what the expat API function XML_ExpatVersion() returns.</dd> <dt><b>expatmajorversion</b></dt> <dd>Returns the major version of the at build time used expat version as integer.</dd> <dt><b>expatminorversion</b></dt> <dd>Returns the minor version of the at build time used expat version as integer.</dd> <dt><b>expatmicroversion</b></dt> <dd>Returns the micro version of the at build time used expat version as integer.</dd> <dt><b>dtd</b></dt> <dd>Returns as boolean if build with <i class="m">--enable-dtd</i>.</dd> |
︙ | ︙ |
Changes to doc/dom.n.
︙ | ︙ | |||
622 623 624 625 626 627 628 | .RS .IP "\fBexpatversion\fR" Returns the version of the underlyling expat version as string, something like "exapt_2.1.0". This is what the expat API function XML_ExpatVersion() returns. .IP "\fBexpatmajorversion\fR" | | | | | | | | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | .RS .IP "\fBexpatversion\fR" Returns the version of the underlyling expat version as string, something like "exapt_2.1.0". This is what the expat API function XML_ExpatVersion() returns. .IP "\fBexpatmajorversion\fR" Returns the major version of the at build time used version as integer. .IP "\fBexpatminorversion\fR" Returns the minor version of the at build time used expat version as integer. .IP "\fBexpatmicroversion\fR" Returns the micro version of the at build time used expat version as integer. .IP "\fBdtd\fR" Returns as boolean if build with \&\fI--enable-dtd\fR. .IP "\fBns\fR" Returns as boolean if build with \&\fI--enable-ns\fR. .IP "\fBunknown\fR" |
︙ | ︙ |
Changes to doc/dom.xml.
︙ | ︙ | |||
551 552 553 554 555 556 557 | <desc>Returns the version of the underlyling expat version as string, something like "exapt_2.1.0". This is what the expat API function XML_ExpatVersion() returns.</desc> </optdef> <optdef> <optname>expatmajorversion</optname> | | | | | | | | 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | <desc>Returns the version of the underlyling expat version as string, something like "exapt_2.1.0". This is what the expat API function XML_ExpatVersion() returns.</desc> </optdef> <optdef> <optname>expatmajorversion</optname> <desc>Returns the major version of the at build time used expat version as integer.</desc> </optdef> <optdef> <optname>expatminorversion</optname> <desc>Returns the minor version of the at build time used expat version as integer.</desc> </optdef> <optdef> <optname>expatmicroversion</optname> <desc>Returns the micro version of the at build time used expat version as integer.</desc> </optdef> <optdef> <optname>dtd</optname> <desc>Returns as boolean if build with <m>--enable-dtd</m>.</desc> </optdef> <optdef> |
︙ | ︙ |
Changes to doc/pullparser.html.
︙ | ︙ | |||
164 165 166 167 168 169 170 | <dt><b class="method">line</b></dt> <dd>This method is valid in all parser states except READY and TEXT. It returns the line number of the parsing position.</dd> | | | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | <dt><b class="method">line</b></dt> <dd>This method is valid in all parser states except READY and TEXT. It returns the line number of the parsing position.</dd> <dt><b class="method">column</b></dt> <dd>This method is valid in all parser states except READY and TEXT. It returns the offset, from the beginning of the current line, of the parsing position.</dd> </dl> <h2><a name="SECTid0x11e0cb0">KEYWORDS</a></h2><p class="keywords"> |
︙ | ︙ |
Changes to doc/pullparser.n.
︙ | ︙ | |||
295 296 297 298 299 300 301 | Miscellaneous methods: .TP \&\fB\fBline\fP \&\fRThis method is valid in all parser states except READY and TEXT. It returns the line number of the parsing position. .TP | | | 295 296 297 298 299 300 301 302 303 304 305 306 307 | Miscellaneous methods: .TP \&\fB\fBline\fP \&\fRThis method is valid in all parser states except READY and TEXT. It returns the line number of the parsing position. .TP \&\fB\fBcolumn\fP \&\fRThis method is valid in all parser states except READY and TEXT. It returns the offset, from the beginning of the current line, of the parsing position. .SH KEYWORDS XML, pull, parsing |
Changes to doc/pullparser.xml.
︙ | ︙ | |||
162 163 164 165 166 167 168 | <command><method>line</method></command> <desc>This method is valid in all parser states except READY and TEXT. It returns the line number of the parsing position.</desc> </commanddef> <commanddef> | | | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | <command><method>line</method></command> <desc>This method is valid in all parser states except READY and TEXT. It returns the line number of the parsing position.</desc> </commanddef> <commanddef> <command><method>column</method></command> <desc>This method is valid in all parser states except READY and TEXT. It returns the offset, from the beginning of the current line, of the parsing position.</desc> </commanddef> </commandlist> </section> |
︙ | ︙ |
Changes to expat/expat.h.
︙ | ︙ | |||
1072 1073 1074 1075 1076 1077 1078 | /* Expat follows the semantic versioning convention. See http://semver.org. */ #define XML_MAJOR_VERSION 2 #define XML_MINOR_VERSION 2 | | | 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | /* Expat follows the semantic versioning convention. See http://semver.org. */ #define XML_MAJOR_VERSION 2 #define XML_MINOR_VERSION 2 #define XML_MICRO_VERSION 6 #ifdef __cplusplus } #endif #endif /* not Expat_INCLUDED */ |
Deleted expat/macconfig.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to expat/siphash.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /* ========================================================================== * siphash.h - SipHash-2-4 in a single header file * -------------------------------------------------------------------------- * Derived by William Ahern from the reference implementation[1] published[2] * by Jean-Philippe Aumasson and Daniel J. Berstein. * Minimal changes by Sebastian Pipping and Victor Stinner on top, see below. * Licensed under the CC0 Public Domain Dedication license. * * 1. https://www.131002.net/siphash/siphash24.c * 2. https://www.131002.net/siphash/ * -------------------------------------------------------------------------- * HISTORY: * * 2017-07-25 (Vadim Zeitlin) * - Fix use of SIPHASH_MAIN macro * * 2017-07-05 (Sebastian Pipping) * - Use _SIP_ULL macro to not require a C++11 compiler if compiled as C++ * - Add const qualifiers at two places * - Ensure <=80 characters line length (assuming tab width 4) | > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | /* ========================================================================== * siphash.h - SipHash-2-4 in a single header file * -------------------------------------------------------------------------- * Derived by William Ahern from the reference implementation[1] published[2] * by Jean-Philippe Aumasson and Daniel J. Berstein. * Minimal changes by Sebastian Pipping and Victor Stinner on top, see below. * Licensed under the CC0 Public Domain Dedication license. * * 1. https://www.131002.net/siphash/siphash24.c * 2. https://www.131002.net/siphash/ * -------------------------------------------------------------------------- * HISTORY: * * 2018-07-08 (Anton Maklakov) * - Add "fall through" markers for GCC's -Wimplicit-fallthrough * * 2017-11-03 (Sebastian Pipping) * - Hide sip_tobin and sip_binof unless SIPHASH_TOBIN macro is defined * * 2017-07-25 (Vadim Zeitlin) * - Fix use of SIPHASH_MAIN macro * * 2017-07-05 (Sebastian Pipping) * - Use _SIP_ULL macro to not require a C++11 compiler if compiled as C++ * - Add const qualifiers at two places * - Ensure <=80 characters line length (assuming tab width 4) |
︙ | ︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | static struct sipkey *sip_tokey(struct sipkey *key, const void *src) { key->k[0] = SIP_U8TO64_LE((const unsigned char *)src); key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8); return key; } /* sip_tokey() */ #define sip_binof(v) sip_tobin((unsigned char[8]){ 0 }, (v)) static void *sip_tobin(void *dst, uint64_t u64) { SIP_U64TO8_LE((unsigned char *)dst, u64); return dst; } /* sip_tobin() */ static void sip_round(struct siphash *H, const int rounds) { int i; for (i = 0; i < rounds; i++) { H->v0 += H->v1; | > > > > | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | static struct sipkey *sip_tokey(struct sipkey *key, const void *src) { key->k[0] = SIP_U8TO64_LE((const unsigned char *)src); key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8); return key; } /* sip_tokey() */ #ifdef SIPHASH_TOBIN #define sip_binof(v) sip_tobin((unsigned char[8]){ 0 }, (v)) static void *sip_tobin(void *dst, uint64_t u64) { SIP_U64TO8_LE((unsigned char *)dst, u64); return dst; } /* sip_tobin() */ #endif /* SIPHASH_TOBIN */ static void sip_round(struct siphash *H, const int rounds) { int i; for (i = 0; i < rounds; i++) { H->v0 += H->v1; |
︙ | ︙ | |||
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | static uint64_t sip24_final(struct siphash *H) { const char left = (char)(H->p - H->buf); uint64_t b = (H->c + left) << 56; switch (left) { case 7: b |= (uint64_t)H->buf[6] << 48; case 6: b |= (uint64_t)H->buf[5] << 40; case 5: b |= (uint64_t)H->buf[4] << 32; case 4: b |= (uint64_t)H->buf[3] << 24; case 3: b |= (uint64_t)H->buf[2] << 16; case 2: b |= (uint64_t)H->buf[1] << 8; case 1: b |= (uint64_t)H->buf[0] << 0; case 0: break; } H->v3 ^= b; sip_round(H, 2); H->v0 ^= b; H->v2 ^= 0xff; | > > > > > > > | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | static uint64_t sip24_final(struct siphash *H) { const char left = (char)(H->p - H->buf); uint64_t b = (H->c + left) << 56; switch (left) { case 7: b |= (uint64_t)H->buf[6] << 48; /* fall through */ case 6: b |= (uint64_t)H->buf[5] << 40; /* fall through */ case 5: b |= (uint64_t)H->buf[4] << 32; /* fall through */ case 4: b |= (uint64_t)H->buf[3] << 24; /* fall through */ case 3: b |= (uint64_t)H->buf[2] << 16; /* fall through */ case 2: b |= (uint64_t)H->buf[1] << 8; /* fall through */ case 1: b |= (uint64_t)H->buf[0] << 0; /* fall through */ case 0: break; } H->v3 ^= b; sip_round(H, 2); H->v0 ^= b; H->v2 ^= 0xff; |
︙ | ︙ |
Changes to expat/xmlparse.c.
|
| | | 1 2 3 4 5 6 7 8 | /* 19ac4776051591216f1874e34ee99b6a43a3784c8bd7d70efeb9258dd22b906a (2.2.6+) __ __ _ ___\ \/ /_ __ __ _| |_ / _ \\ /| '_ \ / _` | __| | __// \| |_) | (_| | |_ \___/_/\_\ .__/ \__,_|\__| |_| XML parser |
︙ | ︙ | |||
157 158 159 160 161 162 163 164 165 166 167 168 169 170 | #define XML_L(x) x #endif /* Round up n to be a multiple of sz, where sz is a power of 2. */ #define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1)) /* Handle the case where memmove() doesn't exist. */ #ifndef HAVE_MEMMOVE #ifdef HAVE_BCOPY #define memmove(d,s,l) bcopy((s),(d),(l)) #else #error memmove does not exist on this platform, nor is a substitute available #endif /* HAVE_BCOPY */ | > > > | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | #define XML_L(x) x #endif /* Round up n to be a multiple of sz, where sz is a power of 2. */ #define ROUND_UP(n, sz) (((n) + ((sz) - 1)) & ~((sz) - 1)) /* Do safe (NULL-aware) pointer arithmetic */ #define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0) /* Handle the case where memmove() doesn't exist. */ #ifndef HAVE_MEMMOVE #ifdef HAVE_BCOPY #define memmove(d,s,l) bcopy((s),(d),(l)) #else #error memmove does not exist on this platform, nor is a substitute available #endif /* HAVE_BCOPY */ |
︙ | ︙ | |||
1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 | parser->m_errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; case XML_INITIALIZED: if (parser->m_parentParser == NULL && !startParsing(parser)) { parser->m_errorCode = XML_ERROR_NO_MEMORY; return XML_STATUS_ERROR; } default: parser->m_parsingStatus.parsing = XML_PARSING; } if (len == 0) { parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal; if (!isFinal) | > | 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 | parser->m_errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; case XML_INITIALIZED: if (parser->m_parentParser == NULL && !startParsing(parser)) { parser->m_errorCode = XML_ERROR_NO_MEMORY; return XML_STATUS_ERROR; } /* fall through */ default: parser->m_parsingStatus.parsing = XML_PARSING; } if (len == 0) { parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal; if (!isFinal) |
︙ | ︙ | |||
1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 | parser->m_errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; case XML_INITIALIZED: if (parser->m_parentParser == NULL && !startParsing(parser)) { parser->m_errorCode = XML_ERROR_NO_MEMORY; return XML_STATUS_ERROR; } default: parser->m_parsingStatus.parsing = XML_PARSING; } start = parser->m_bufferPtr; parser->m_positionPtr = start; parser->m_bufferEnd += len; | > | 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 | parser->m_errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; case XML_INITIALIZED: if (parser->m_parentParser == NULL && !startParsing(parser)) { parser->m_errorCode = XML_ERROR_NO_MEMORY; return XML_STATUS_ERROR; } /* fall through */ default: parser->m_parsingStatus.parsing = XML_PARSING; } start = parser->m_bufferPtr; parser->m_positionPtr = start; parser->m_bufferEnd += len; |
︙ | ︙ | |||
2022 2023 2024 2025 2026 2027 2028 | return NULL; case XML_FINISHED: parser->m_errorCode = XML_ERROR_FINISHED; return NULL; default: ; } | | | > > | | | | > > | > | > | > | | | > | > > | | > > > > > | > | 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 | return NULL; case XML_FINISHED: parser->m_errorCode = XML_ERROR_FINISHED; return NULL; default: ; } if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) { #ifdef XML_CONTEXT_BYTES int keep; #endif /* defined XML_CONTEXT_BYTES */ /* Do not invoke signed arithmetic overflow: */ int neededSize = (int) ((unsigned)len + (unsigned)EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)); if (neededSize < 0) { parser->m_errorCode = XML_ERROR_NO_MEMORY; return NULL; } #ifdef XML_CONTEXT_BYTES keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer); if (keep > XML_CONTEXT_BYTES) keep = XML_CONTEXT_BYTES; neededSize += keep; #endif /* defined XML_CONTEXT_BYTES */ if (neededSize <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) { #ifdef XML_CONTEXT_BYTES if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) { int offset = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer) - keep; /* The buffer pointers cannot be NULL here; we have at least some bytes in the buffer */ memmove(parser->m_buffer, &parser->m_buffer[offset], parser->m_bufferEnd - parser->m_bufferPtr + keep); parser->m_bufferEnd -= offset; parser->m_bufferPtr -= offset; } #else if (parser->m_buffer && parser->m_bufferPtr) { memmove(parser->m_buffer, parser->m_bufferPtr, EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)); parser->m_bufferEnd = parser->m_buffer + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr); parser->m_bufferPtr = parser->m_buffer; } #endif /* not defined XML_CONTEXT_BYTES */ } else { char *newBuf; int bufferSize = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr); if (bufferSize == 0) bufferSize = INIT_BUFFER_SIZE; do { /* Do not invoke signed arithmetic overflow: */ bufferSize = (int) (2U * (unsigned) bufferSize); } while (bufferSize < neededSize && bufferSize > 0); if (bufferSize <= 0) { parser->m_errorCode = XML_ERROR_NO_MEMORY; return NULL; } newBuf = (char *)MALLOC(parser, bufferSize); if (newBuf == 0) { parser->m_errorCode = XML_ERROR_NO_MEMORY; return NULL; } parser->m_bufferLim = newBuf + bufferSize; #ifdef XML_CONTEXT_BYTES if (parser->m_bufferPtr) { int keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer); if (keep > XML_CONTEXT_BYTES) keep = XML_CONTEXT_BYTES; memcpy(newBuf, &parser->m_bufferPtr[-keep], EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr) + keep); FREE(parser, parser->m_buffer); parser->m_buffer = newBuf; parser->m_bufferEnd = parser->m_buffer + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr) + keep; parser->m_bufferPtr = parser->m_buffer + keep; } else { /* This must be a brand new buffer with no data in it yet */ parser->m_bufferEnd = newBuf; parser->m_bufferPtr = parser->m_buffer = newBuf; } #else if (parser->m_bufferPtr) { memcpy(newBuf, parser->m_bufferPtr, EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)); FREE(parser, parser->m_buffer); parser->m_bufferEnd = newBuf + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr); } else { /* This must be a brand new buffer with no data in it yet */ parser->m_bufferEnd = newBuf; } parser->m_bufferPtr = parser->m_buffer = newBuf; #endif /* not defined XML_CONTEXT_BYTES */ } parser->m_eventPtr = parser->m_eventEndPtr = NULL; parser->m_positionPtr = NULL; } return parser->m_bufferEnd; |
︙ | ︙ | |||
2904 2905 2906 2907 2908 2909 2910 | noElmHandlers = XML_FALSE; } if (noElmHandlers && parser->m_defaultHandler) reportDefault(parser, enc, s, next); poolClear(&parser->m_tempPool); freeBindings(parser, bindings); } | | | > > | | 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 | noElmHandlers = XML_FALSE; } if (noElmHandlers && parser->m_defaultHandler) reportDefault(parser, enc, s, next); poolClear(&parser->m_tempPool); freeBindings(parser, bindings); } if ((parser->m_tagLevel == 0) && (parser->m_parsingStatus.parsing != XML_FINISHED)) { if (parser->m_parsingStatus.parsing == XML_SUSPENDED) parser->m_processor = epilogProcessor; else return epilogProcessor(parser, next, end, nextPtr); } break; case XML_TOK_END_TAG: if (parser->m_tagLevel == startTagLevel) return XML_ERROR_ASYNC_ENTITY; else { int len; |
︙ | ︙ | |||
4742 4743 4744 4745 4746 4747 4748 | &dtd->paramEntities, externalSubsetName, sizeof(ENTITY)); if (!parser->m_declEntity) return XML_ERROR_NO_MEMORY; parser->m_declEntity->publicId = NULL; } | < > | 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 | &dtd->paramEntities, externalSubsetName, sizeof(ENTITY)); if (!parser->m_declEntity) return XML_ERROR_NO_MEMORY; parser->m_declEntity->publicId = NULL; } #endif /* XML_DTD */ /* fall through */ case XML_ROLE_ENTITY_SYSTEM_ID: if (dtd->keepProcessing && parser->m_declEntity) { parser->m_declEntity->systemId = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar); if (!parser->m_declEntity->systemId) return XML_ERROR_NO_MEMORY; |
︙ | ︙ | |||
6639 6640 6641 6642 6643 6644 6645 | } static unsigned long FASTCALL hash(XML_Parser parser, KEY s) { struct siphash state; struct sipkey key; | < | 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 | } static unsigned long FASTCALL hash(XML_Parser parser, KEY s) { struct siphash state; struct sipkey key; (void)sip24_valid; copy_salt_to_sipkey(parser, &key); sip24_init(&state, &key); sip24_update(&state, s, keylen(s) * sizeof(XML_Char)); return (unsigned long)sip24_final(&state); } |
︙ | ︙ |
Changes to expat/xmltok_impl.c.
︙ | ︙ | |||
70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #define CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NAME_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ case BT_NMSTRT: \ case BT_HEX: \ case BT_DIGIT: \ case BT_NAME: \ case BT_MINUS: \ ptr += MINBPC(enc); \ break; \ | > | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | #define CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NAME_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ /* fall through */ \ case BT_NMSTRT: \ case BT_HEX: \ case BT_DIGIT: \ case BT_NAME: \ case BT_MINUS: \ ptr += MINBPC(enc); \ break; \ |
︙ | ︙ | |||
98 99 100 101 102 103 104 105 106 107 108 109 110 111 | #define CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ case BT_NMSTRT: \ case BT_HEX: \ ptr += MINBPC(enc); \ break; \ CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr) | > | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | #define CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) \ case BT_NONASCII: \ if (!IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { \ *nextTokPtr = ptr; \ return XML_TOK_INVALID; \ } \ /* fall through */ \ case BT_NMSTRT: \ case BT_HEX: \ ptr += MINBPC(enc); \ break; \ CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr) \ CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr) |
︙ | ︙ | |||
598 599 600 601 602 603 604 | case BT_CR: break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } | | | 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | case BT_CR: break; default: *nextTokPtr = ptr; return XML_TOK_INVALID; } } /* fall through */ case BT_EQUALS: { int open; #ifdef XML_NS hadColon = 0; #endif for (;;) { |
︙ | ︙ | |||
1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 | return 0; } break; case BT_NAME: case BT_NMSTRT: if (!(BYTE_TO_ASCII(enc, ptr) & ~0x7f)) break; default: switch (BYTE_TO_ASCII(enc, ptr)) { case 0x24: /* $ */ case 0x40: /* @ */ break; default: *badPtr = ptr; | > | 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 | return 0; } break; case BT_NAME: case BT_NMSTRT: if (!(BYTE_TO_ASCII(enc, ptr) & ~0x7f)) break; /* fall through */ default: switch (BYTE_TO_ASCII(enc, ptr)) { case 0x24: /* $ */ case 0x40: /* @ */ break; default: *badPtr = ptr; |
︙ | ︙ | |||
1655 1656 1657 1658 1659 1660 1661 | static int PTRCALL PREFIX(nameMatchesAscii)(const ENCODING *UNUSED_P(enc), const char *ptr1, const char *end1, const char *ptr2) { for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) { if (end1 - ptr1 < MINBPC(enc)) { | | | | 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 | static int PTRCALL PREFIX(nameMatchesAscii)(const ENCODING *UNUSED_P(enc), const char *ptr1, const char *end1, const char *ptr2) { for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) { if (end1 - ptr1 < MINBPC(enc)) { /* This line cannot be executed. The incoming data has already * been tokenized once, so incomplete characters like this have * already been eliminated from the input. Retaining the * paranoia check is still valuable, however. */ return 0; /* LCOV_EXCL_LINE */ } if (!CHAR_MATCHES(enc, ptr1, *ptr2)) return 0; |
︙ | ︙ |
Changes to extensions/tdomhtml/tdomhtml.tcl.
1 2 3 4 5 6 7 8 9 10 | #---------------------------------------------------------------------------- # Copyright (c) 1999,2000 Jochen Loewer ([email protected]) et al. #---------------------------------------------------------------------------- # # Rcsid: @(#)$Id$ # # Implements simple HTML layer on top of core DOM Level-1 specification, # as implemented in tDOM package. # # The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #---------------------------------------------------------------------------- # Copyright (c) 1999,2000 Jochen Loewer ([email protected]) et al. #---------------------------------------------------------------------------- # # Rcsid: @(#)$Id$ # # Implements simple HTML layer on top of core DOM Level-1 specification, # as implemented in tDOM package. # # The contents of this file are subject to the Mozilla Public License # Version 2.0 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations # under the License. |
︙ | ︙ | |||
47 48 49 50 51 52 53 | # # This package requires the loaded tdom # so bark early if we can't find it. # package require tdom | < < < < < < < < < < | < | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | # # This package requires the loaded tdom # so bark early if we can't find it. # package require tdom package provide tdomhtml 0.1.0 # # Declare HTML generating commands # namespace eval ::dom::domHTML { |
︙ | ︙ |
Changes to extensions/tnc/tests/loadtnc.tcl.
|
| | | | 1 2 3 4 5 6 7 8 9 10 | catch {load ../../../unix/libtdom0.9.2.so} catch {load ../libtnc0.3.0.so} catch {load ../../unix/libtdom0.9.2.so} catch {load libtnc0.3.0.so} # loadtnc.tcl -- # # This file is [source]d by all.tcl and all test files, to ensure, that # the tcltest package and the lastest tnc build is present. if {[lsearch [namespace children] ::tcltest] == -1} { |
︙ | ︙ |
Changes to generic/dom.c.
1 2 3 4 5 6 7 8 9 10 11 12 | /*--------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A DOM interface upon the expat XML parser for the C language | according to the W3C recommendation REC-DOM-Level-1-19981001 | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /*--------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A DOM interface upon the expat XML parser for the C language | according to the W3C recommendation REC-DOM-Level-1-19981001 | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ | |||
2401 2402 2403 2404 2405 2406 2407 | node = (domNode*) domAlloc(sizeof(domNode) + sizeof(domLineColumn)); } else { node = (domNode*) domAlloc(sizeof(domNode)); } memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; | < < | 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 | node = (domNode*) domAlloc(sizeof(domNode) + sizeof(domLineColumn)); } else { node = (domNode*) domAlloc(sizeof(domNode)); } memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; node->nodeName = (char *)&(h->key); node->nodeNumber = NODE_NO(info->document); node->ownerDocument = info->document; if (info->baseURIstack[info->baseURIstackPos].baseURI != XML_GetBase (info->parser)) { h = Tcl_CreateHashEntry (info->document->baseURIs, |
︙ | ︙ | |||
2605 2606 2607 2608 2609 2610 2611 | h = Tcl_CreateHashEntry(&HASHTAB(info->document, tdom_attrNames), atPtr[0], &hnew); attrnode = (domAttrNode*) domAlloc(sizeof(domAttrNode)); memset(attrnode, 0, sizeof(domAttrNode)); attrnode->nodeType = ATTRIBUTE_NODE; if (atPtr == idAttPtr) { attrnode->nodeFlags |= IS_ID_ATTRIBUTE; | < < < | 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 | h = Tcl_CreateHashEntry(&HASHTAB(info->document, tdom_attrNames), atPtr[0], &hnew); attrnode = (domAttrNode*) domAlloc(sizeof(domAttrNode)); memset(attrnode, 0, sizeof(domAttrNode)); attrnode->nodeType = ATTRIBUTE_NODE; if (atPtr == idAttPtr) { attrnode->nodeFlags |= IS_ID_ATTRIBUTE; } attrnode->nodeName = (char *)&(h->key); attrnode->parentNode = node; len = strlen(atPtr[1]); attrnode->valueLength = len; attrnode->nodeValue = (char*)MALLOC(len+1); strcpy(attrnode->nodeValue, (char *)atPtr[1]); |
︙ | ︙ | |||
2900 2901 2902 2903 2904 2905 2906 | node = (domTextNode*) domAlloc(sizeof(domTextNode)); } memset(node, 0, sizeof(domTextNode)); if (info->cdataSection) node->nodeType = CDATA_SECTION_NODE; else node->nodeType = TEXT_NODE; | < | 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 | node = (domTextNode*) domAlloc(sizeof(domTextNode)); } memset(node, 0, sizeof(domTextNode)); if (info->cdataSection) node->nodeType = CDATA_SECTION_NODE; else node->nodeType = TEXT_NODE; node->nodeNumber = NODE_NO(info->document); node->valueLength = len; node->nodeValue = (char*)MALLOC(len); memmove(node->nodeValue, s, len); node->ownerDocument = info->document; node->parentNode = parentNode; |
︙ | ︙ | |||
2973 2974 2975 2976 2977 2978 2979 | node = (domTextNode*) domAlloc(sizeof(domTextNode) + sizeof(domLineColumn)); } else { node = (domTextNode*) domAlloc(sizeof(domTextNode)); } memset(node, 0, sizeof(domTextNode)); node->nodeType = COMMENT_NODE; | < | 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 | node = (domTextNode*) domAlloc(sizeof(domTextNode) + sizeof(domLineColumn)); } else { node = (domTextNode*) domAlloc(sizeof(domTextNode)); } memset(node, 0, sizeof(domTextNode)); node->nodeType = COMMENT_NODE; node->nodeNumber = NODE_NO(info->document); node->valueLength = len; node->nodeValue = (char*)MALLOC(len); memmove(node->nodeValue, s, len); node->ownerDocument = info->document; node->parentNode = parentNode; |
︙ | ︙ | |||
3055 3056 3057 3058 3059 3060 3061 | + sizeof(domLineColumn)); } else { node = (domProcessingInstructionNode*) domAlloc(sizeof(domProcessingInstructionNode)); } memset(node, 0, sizeof(domProcessingInstructionNode)); node->nodeType = PROCESSING_INSTRUCTION_NODE; | < < | 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 | + sizeof(domLineColumn)); } else { node = (domProcessingInstructionNode*) domAlloc(sizeof(domProcessingInstructionNode)); } memset(node, 0, sizeof(domProcessingInstructionNode)); node->nodeType = PROCESSING_INSTRUCTION_NODE; node->nodeNumber = NODE_NO(info->document); if (info->baseURIstack[info->baseURIstackPos].baseURI != XML_GetBase (info->parser)) { h = Tcl_CreateHashEntry (info->document->baseURIs, (char*) node, &hnew); |
︙ | ︙ | |||
4397 4398 4399 4400 4401 4402 4403 | } memset(rootNode, 0, sizeof(domNode)); rootNode->nodeType = ELEMENT_NODE; if (baseURI) { h = Tcl_CreateHashEntry (doc->baseURIs, (char*)rootNode, &hnew); Tcl_SetHashValue (h, tdomstrdup (baseURI)); rootNode->nodeFlags |= HAS_BASEURI; | < < | 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 | } memset(rootNode, 0, sizeof(domNode)); rootNode->nodeType = ELEMENT_NODE; if (baseURI) { h = Tcl_CreateHashEntry (doc->baseURIs, (char*)rootNode, &hnew); Tcl_SetHashValue (h, tdomstrdup (baseURI)); rootNode->nodeFlags |= HAS_BASEURI; } rootNode->namespace = 0; h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_tagNames), "", &hnew); rootNode->nodeName = (char *)&(h->key); rootNode->nodeNumber = NODE_NO(doc); rootNode->ownerDocument = doc; rootNode->parentNode = NULL; |
︙ | ︙ | |||
4450 4451 4452 4453 4454 4455 4456 | doc = domCreateDoc (NULL, 0); h = Tcl_CreateHashEntry(&HASHTAB(doc, tdom_tagNames), documentElementTagName, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; | < | 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 | doc = domCreateDoc (NULL, 0); h = Tcl_CreateHashEntry(&HASHTAB(doc, tdom_tagNames), documentElementTagName, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; node->nodeNumber = NODE_NO(doc); node->ownerDocument = doc; node->nodeName = (char *)&(h->key); doc->documentElement = node; if (uri) { ns = domNewNamespace (doc, prefix, uri); node->namespace = ns->index; |
︙ | ︙ | |||
5888 5889 5890 5891 5892 5893 5894 | ) { domTextNode *node; node = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(node, 0, sizeof(domTextNode)); node->nodeType = nodeType; | < | 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 | ) { domTextNode *node; node = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(node, 0, sizeof(domTextNode)); node->nodeType = nodeType; node->nodeNumber = NODE_NO(doc); node->ownerDocument = doc; node->valueLength = length; node->nodeValue = (char*)MALLOC(length); memmove(node->nodeValue, value, length); if (doc->fragments) { |
︙ | ︙ | |||
5943 5944 5945 5946 5947 5948 5949 | pc++; } if (start) { Tcl_DStringAppend (escapedData, &value[start], length - start); } } | < | < | 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 | pc++; } if (start) { Tcl_DStringAppend (escapedData, &value[start], length - start); } } /*--------------------------------------------------------------------------- | domAppendNewTextNode | \--------------------------------------------------------------------------*/ domTextNode * domAppendNewTextNode( domNode *parent, char *value, int length, domNodeType nodeType, int disableOutputEscaping ) { domTextNode *node; if (!length && (nodeType == TEXT_NODE)) { return NULL; } if (parent->lastChild && parent->lastChild->nodeType == TEXT_NODE && nodeType == TEXT_NODE ) { /*------------------------------------------------------------------ | append to already existing text node \-----------------------------------------------------------------*/ domAppendData ((domTextNode *) (parent->lastChild), value, length, disableOutputEscaping); MutationEvent(); return (domTextNode*)parent->lastChild; } node = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(node, 0, sizeof(domTextNode)); node->nodeType = nodeType; if (disableOutputEscaping) { node->nodeFlags |= DISABLE_OUTPUT_ESCAPING; } node->nodeNumber = NODE_NO(parent->ownerDocument); node->ownerDocument = parent->ownerDocument; node->valueLength = length; node->nodeValue = (char*)MALLOC(length); |
︙ | ︙ | |||
6407 6408 6409 6410 6411 6412 6413 | ) { domProcessingInstructionNode *node; node = (domProcessingInstructionNode*) domAlloc(sizeof(domProcessingInstructionNode)); memset(node, 0, sizeof(domProcessingInstructionNode)); node->nodeType = PROCESSING_INSTRUCTION_NODE; | < < | 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 | ) { domProcessingInstructionNode *node; node = (domProcessingInstructionNode*) domAlloc(sizeof(domProcessingInstructionNode)); memset(node, 0, sizeof(domProcessingInstructionNode)); node->nodeType = PROCESSING_INSTRUCTION_NODE; node->nodeNumber = NODE_NO(doc); node->ownerDocument = doc; node->targetLength = targetLength; node->targetValue = (char*)MALLOC(targetLength); memmove(node->targetValue, targetValue, targetLength); node->dataLength = dataLength; |
︙ | ︙ | |||
6450 6451 6452 6453 6454 6455 6456 | Tcl_HashEntry *h; int hnew; h = Tcl_CreateHashEntry(&HASHTAB(doc, tdom_tagNames), tagName, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; | < < | 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 | Tcl_HashEntry *h; int hnew; h = Tcl_CreateHashEntry(&HASHTAB(doc, tdom_tagNames), tagName, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; node->nodeNumber = NODE_NO(doc); node->ownerDocument = doc; node->nodeName = (char *)&(h->key); if (doc->fragments) { node->nextSibling = doc->fragments; doc->fragments->previousSibling = node; |
︙ | ︙ | |||
6495 6496 6497 6498 6499 6500 6501 | return NULL; } h = Tcl_CreateHashEntry(&HASHTAB(doc, tdom_tagNames), tagName, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; | < < | 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 | return NULL; } h = Tcl_CreateHashEntry(&HASHTAB(doc, tdom_tagNames), tagName, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; node->nodeNumber = NODE_NO(doc); node->ownerDocument = doc; node->nodeName = (char *)&(h->key); ns = domNewNamespace(doc, prefix, uri); node->namespace = ns->index; |
︙ | ︙ |
Changes to generic/dom.h.
1 2 3 4 5 6 7 8 9 10 11 12 | /*--------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A DOM interface upon the expat XML parser for the C language | according to the W3C recommendation REC-DOM-Level-1-19981001 | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /*--------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A DOM interface upon the expat XML parser for the C language | according to the W3C recommendation REC-DOM-Level-1-19981001 | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/domalloc.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /*--------------------------------------------------------------------------- | Copyright (C) 1999-2000 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A special memory allocator, which uses pre-allocated / bit masked | based administration of memory blocks with fixed sizes, like | DOM nodes. This will hopefully save some memory. | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /*--------------------------------------------------------------------------- | Copyright (C) 1999-2000 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A special memory allocator, which uses pre-allocated / bit masked | based administration of memory blocks with fixed sizes, like | DOM nodes. This will hopefully save some memory. | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/domalloc.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /*--------------------------------------------------------------------------- | Copyright (C) 1999-2000 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A special memory allocator, which uses pre-allocated / bit masked | based administration of memory block with fixed sizes, like | DOM nodes. This will hopefully save some memory. | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /*--------------------------------------------------------------------------- | Copyright (C) 1999-2000 Jochen C. Loewer ([email protected]) +---------------------------------------------------------------------------- | | $Id$ | | | A special memory allocator, which uses pre-allocated / bit masked | based administration of memory block with fixed sizes, like | DOM nodes. This will hopefully save some memory. | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/domhtml.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /*---------------------------------------------------------------------------- | Copyright (c) 2000 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | | !! EXPERIMENTAL / pre alpha !! | A simple (hopefully fast) HTML parser to build up a DOM structure | in memory. | Based on xmlsimple.c. | !! EXPERIMENTAL / pre alpha !! | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /*---------------------------------------------------------------------------- | Copyright (c) 2000 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | | !! EXPERIMENTAL / pre alpha !! | A simple (hopefully fast) HTML parser to build up a DOM structure | in memory. | Based on xmlsimple.c. | !! EXPERIMENTAL / pre alpha !! | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ | |||
551 552 553 554 555 556 557 | z[to++] = (char) ((value | 0x80) & 0xBF); } else { /* error */ } from = i+1; } } else { | | | 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 | z[to++] = (char) ((value | 0x80) & 0xBF); } else { /* error */ } from = i+1; } } else { while (z[i] && isalnum((unsigned char)z[i])) { i++; } c = z[i]; z[i] = 0; h = ErHash(&z[from+1]); p = apErHash[h]; while (p && strcmp(p->zName,&z[from+1])!=0 ) { |
︙ | ︙ | |||
654 655 656 657 658 659 660 661 662 663 664 665 666 667 | only_whites = 1; if (c=='<') x++; while ( (c=*x)!=0 && c!='<' ) { if (c=='&') ampersandSeen = 1; if ( !SPACE(c) ) only_whites = 0; x++; } if (!(only_whites && ignoreWhiteSpaces) && parent_node) { /*-------------------------------------------------------- | allocate new TEXT node \-------------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; | > < | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 | only_whites = 1; if (c=='<') x++; while ( (c=*x)!=0 && c!='<' ) { if (c=='&') ampersandSeen = 1; if ( !SPACE(c) ) only_whites = 0; x++; } if (!(only_whites && ignoreWhiteSpaces) && parent_node) { /*-------------------------------------------------------- | allocate new TEXT node \-------------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; tnode->ownerDocument = doc; tnode->nodeNumber = NODE_NO(doc); tnode->valueLength = (x - start); tnode->nodeValue = (char*)MALLOC((x - start)+1); memmove(tnode->nodeValue, start, (x - start)); *(tnode->nodeValue + (x - start)) = 0; DBG(fprintf(stderr, "New text node: '%s'\n", tnode->nodeValue);) |
︙ | ︙ | |||
868 869 870 871 872 873 874 | if (*x) { /*---------------------------------------------------- | allocate new COMMENT node for comments \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = COMMENT_NODE; | < | 868 869 870 871 872 873 874 875 876 877 878 879 880 881 | if (*x) { /*---------------------------------------------------- | allocate new COMMENT node for comments \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = COMMENT_NODE; tnode->ownerDocument = doc; tnode->nodeNumber = NODE_NO(doc); tnode->parentNode = parent_node; tnode->valueLength = x - start - 4; tnode->nodeValue = (char*)MALLOC(tnode->valueLength+1); memmove(tnode->nodeValue, start+4, tnode->valueLength); *(tnode->nodeValue + tnode->valueLength) = 0; |
︙ | ︙ | |||
947 948 949 950 951 952 953 | if (parent_node) { /*---------------------------------------------------- | allocate new TEXT node for CDATA section data \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; | < | 946 947 948 949 950 951 952 953 954 955 956 957 958 959 | if (parent_node) { /*---------------------------------------------------- | allocate new TEXT node for CDATA section data \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; tnode->ownerDocument = doc; tnode->nodeNumber = NODE_NO(doc); tnode->parentNode = parent_node; tnode->valueLength = (x - start); tnode->nodeValue = (char*)MALLOC((x - start)+1); memmove(tnode->nodeValue, start, (x - start)); *(tnode->nodeValue + (x - start)) = 0; |
︙ | ︙ | |||
990 991 992 993 994 995 996 | /*------------------------------------------------------------ | allocate new PI node for processing instruction section \-----------------------------------------------------------*/ pinode = (domProcessingInstructionNode*) MALLOC(sizeof(domProcessingInstructionNode)); memset(pinode, 0, sizeof(domProcessingInstructionNode)); pinode->nodeType = PROCESSING_INSTRUCTION_NODE; | < < | 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 | /*------------------------------------------------------------ | allocate new PI node for processing instruction section \-----------------------------------------------------------*/ pinode = (domProcessingInstructionNode*) MALLOC(sizeof(domProcessingInstructionNode)); memset(pinode, 0, sizeof(domProcessingInstructionNode)); pinode->nodeType = PROCESSING_INSTRUCTION_NODE; pinode->ownerDocument = doc; pinode->nodeNumber = NODE_NO(doc); pinode->parentNode = parent_node; /*------------------------------------------------- | extract PI target \------------------------------------------------*/ |
︙ | ︙ | |||
1094 1095 1096 1097 1098 1099 1100 | node = parent_node; parent_node = node->parentNode; } /*----------------------------------------------------------- | create new DOM element node \----------------------------------------------------------*/ | > > | > > > > > > > > > > > | > > > > > < < | 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 | node = parent_node; parent_node = node->parentNode; } /*----------------------------------------------------------- | create new DOM element node \----------------------------------------------------------*/ if (!parent_node && (strcmp(e,"html")!=0)) { // Insert missing html tag h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_tagNames), "html", &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; node->nodeName = (char *)&(h->key); node->ownerDocument = doc; node->nodeNumber = NODE_NO(doc); if (doc->rootNode->lastChild) { node->previousSibling = doc->rootNode->lastChild; doc->rootNode->lastChild->nextSibling = node; } else { doc->rootNode->firstChild = node; } doc->rootNode->lastChild = node; parent_node = node; DBG(fprintf(stderr, "%d: Inserted missing tag '%s' hasContent=%d nodeNumber=%d\n", getDeep(node), node->nodeName, hasContent, node->nodeNumber);) } h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_tagNames), e, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; node->nodeName = (char *)&(h->key); node->ownerDocument = doc; node->nodeNumber = NODE_NO(doc); if (parent_node == NULL) { if (doc->rootNode->lastChild) { node->previousSibling = doc->rootNode->lastChild; |
︙ | ︙ | |||
1205 1206 1207 1208 1209 1210 1211 | h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_attrNames), ArgName, &hnew); attrnode = (domAttrNode*) domAlloc(sizeof(domAttrNode)); memset(attrnode, 0, sizeof(domAttrNode)); attrnode->parentNode = node; attrnode->nodeName = (char *)&(h->key); attrnode->nodeType = ATTRIBUTE_NODE; | < | 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 | h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_attrNames), ArgName, &hnew); attrnode = (domAttrNode*) domAlloc(sizeof(domAttrNode)); memset(attrnode, 0, sizeof(domAttrNode)); attrnode->parentNode = node; attrnode->nodeName = (char *)&(h->key); attrnode->nodeType = ATTRIBUTE_NODE; attrnode->nodeValue = (char*)MALLOC(nArgVal+1); attrnode->valueLength = nArgVal; memmove(attrnode->nodeValue, ArgVal, nArgVal); *(attrnode->nodeValue + nArgVal) = 0; if (ampersandSeen) { TranslateEntityRefs(attrnode->nodeValue, &(attrnode->valueLength) ); |
︙ | ︙ | |||
1314 1315 1316 1317 1318 1319 1320 | if (*x) { /*---------------------------------------------------- | allocate new TEXT node for style/script data \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; | < | 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 | if (*x) { /*---------------------------------------------------- | allocate new TEXT node for style/script data \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; tnode->ownerDocument = doc; tnode->nodeNumber = NODE_NO(doc); tnode->parentNode = node; tnode->valueLength = (x - start); tnode->nodeValue = (char*)MALLOC((x - start)+1); memmove(tnode->nodeValue, start, (x - start)); *(tnode->nodeValue + (x - start)) = 0; |
︙ | ︙ |
Changes to generic/domhtml5.c.
1 2 3 4 5 6 | /*---------------------------------------------------------------------------- | Copyright (c) 2017 Rolf Ade ([email protected]) |----------------------------------------------------------------------------- | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /*---------------------------------------------------------------------------- | Copyright (c) 2017 Rolf Ade ([email protected]) |----------------------------------------------------------------------------- | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/domjson.c.
1 2 3 4 5 6 | /*---------------------------------------------------------------------------- | Copyright (c) 2017 Rolf Ade ([email protected]) |----------------------------------------------------------------------------- | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /*---------------------------------------------------------------------------- | Copyright (c) 2017 Rolf Ade ([email protected]) |----------------------------------------------------------------------------- | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/domlock.c.
1 2 3 4 5 6 7 | /*---------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /*---------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/domxpath.c.
︙ | ︙ | |||
8 9 10 11 12 13 14 | | A XPath implementation (lexer/parser/evaluator) for tDOM, | the DOM implementation for Tcl. | Based on November 16 1999 Recommendation of the W3C | (http://www.w3.org/TR/1999/REC-xslt-19991116) | | | The contents of this file are subject to the Mozilla Public License | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | | A XPath implementation (lexer/parser/evaluator) for tDOM, | the DOM implementation for Tcl. | Based on November 16 1999 Recommendation of the W3C | (http://www.w3.org/TR/1999/REC-xslt-19991116) | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ | |||
2431 2432 2433 2434 2435 2436 2437 | DBG(fprintf(stderr, "nodeTest: nodeType=%d == %d?? \n", node->nodeType, TEXT_NODE);) return (node->nodeType == TEXT_NODE); } else if (step->child->type == IsPI) { return (node->nodeType == PROCESSING_INSTRUCTION_NODE); } else if (step->child->type == IsSpecificPI) { | > | | | | | 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 | DBG(fprintf(stderr, "nodeTest: nodeType=%d == %d?? \n", node->nodeType, TEXT_NODE);) return (node->nodeType == TEXT_NODE); } else if (step->child->type == IsPI) { return (node->nodeType == PROCESSING_INSTRUCTION_NODE); } else if (step->child->type == IsSpecificPI) { return (node->nodeType == PROCESSING_INSTRUCTION_NODE && strncmp (((domProcessingInstructionNode*)node)->targetValue, step->child->strvalue, ((domProcessingInstructionNode*)node)->targetLength) == 0); } else if (step->child->type == IsComment) { return (node->nodeType == COMMENT_NODE); } return 1; } |
︙ | ︙ | |||
2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 | int xpathRound (double r) { if (r < 0.0) { return (int)floor (r + 0.5); } else { return (int)(r + 0.5); } } /*---------------------------------------------------------------------------- | xpathEvalFunction | \---------------------------------------------------------------------------*/ static int xpathEvalFunction ( | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 | int xpathRound (double r) { if (r < 0.0) { return (int)floor (r + 0.5); } else { return (int)(r + 0.5); } } /*---------------------------------------------------------------------------- | idSplitAndAdd | \---------------------------------------------------------------------------*/ static void idSplitAndAdd ( char *idStr, Tcl_HashTable *ids, xpathResultSet *result ) { int pwhite; char *pfrom, *pto; Tcl_HashEntry *entryPtr; domNode *node; pwhite = 0; pfrom = pto = idStr; while (*pto) { switch (*pto) { case ' ' : case '\n': case '\r': case '\t': if (pwhite) { pto++; continue; } *pto = '\0'; entryPtr = Tcl_FindHashEntry (ids, pfrom); if (entryPtr) { node = (domNode*) Tcl_GetHashValue (entryPtr); /* Don't report nodes out of the fragment list */ if (node->parentNode != NULL || (node == node->ownerDocument->documentElement)) { rsAddNode (result, node); } } pwhite = 1; pto++; continue; default: if (pwhite) { pfrom = pto; pwhite = 0; } pto++; } } if (!pwhite) { entryPtr = Tcl_FindHashEntry (ids, pfrom); if (entryPtr) { node = (domNode*) Tcl_GetHashValue (entryPtr); /* Don't report nodes out of the fragment list */ if (node->parentNode != NULL || (node == node->ownerDocument->documentElement)) { rsAddNode (result, node); } } } } /*---------------------------------------------------------------------------- | xpathEvalFunction | \---------------------------------------------------------------------------*/ static int xpathEvalFunction ( |
︙ | ︙ | |||
3068 3069 3070 3071 3072 3073 3074 | if (leftResult.type == EmptyResult) { xpathRSFree (&leftResult); return XPATH_OK; } if (leftResult.type == xNodeSetResult) { for (i=0; i < leftResult.nr_nodes; i++) { leftStr = xpathFuncStringForNode (leftResult.nodes[i]); | | < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 | if (leftResult.type == EmptyResult) { xpathRSFree (&leftResult); return XPATH_OK; } if (leftResult.type == xNodeSetResult) { for (i=0; i < leftResult.nr_nodes; i++) { leftStr = xpathFuncStringForNode (leftResult.nodes[i]); idSplitAndAdd (leftStr, ids, result); FREE(leftStr); } } else { leftStr = xpathFuncString (&leftResult); idSplitAndAdd (leftStr, ids, result); FREE(leftStr); } sortByDocOrder (result); xpathRSFree (&leftResult); break; case f_sum: |
︙ | ︙ | |||
5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 | if (steps->type == IsNSAttr) { if (strcmp(steps->child->strvalue, "*")==0) { return -0.25; } else { return 0.0; } } else if ( steps->type == IsNode || steps->type == IsText || steps->type == IsPI || steps->type == IsComment | > > > < | 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 | if (steps->type == IsNSAttr) { if (strcmp(steps->child->strvalue, "*")==0) { return -0.25; } else { return 0.0; } } else if (steps->type == IsSpecificPI) { return 0.0; } else if ( steps->type == IsNode || steps->type == IsText || steps->type == IsPI || steps->type == IsComment ) { return -0.5; } else if ( steps->type == AxisChild || steps->type == AxisAttribute || steps->type == EvalSteps ) { |
︙ | ︙ |
Changes to generic/domxpath.h.
︙ | ︙ | |||
8 9 10 11 12 13 14 | | A (partial) XPath implementation (lexer/parser/evaluator) for tDOM, | the DOM implementation for Tcl. | Based on the August 13 working draft of the W3C | (http://www.w3.org/1999/08/WD-xpath-19990813.html) | | | The contents of this file are subject to the Mozilla Public License | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | | A (partial) XPath implementation (lexer/parser/evaluator) for tDOM, | the DOM implementation for Tcl. | Based on the August 13 working draft of the W3C | (http://www.w3.org/1999/08/WD-xpath-19990813.html) | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/domxslt.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /*---------------------------------------------------------------------------- | Copyright (c) 2000 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | $Id$ | | | A XSLT implementation for tDOM, according to the W3C | recommendation (16 Nov 1999). | See http://www.w3.org/TR/1999/REC-xslt-19991116 for details. | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /*---------------------------------------------------------------------------- | Copyright (c) 2000 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | $Id$ | | | A XSLT implementation for tDOM, according to the W3C | recommendation (16 Nov 1999). | See http://www.w3.org/TR/1999/REC-xslt-19991116 for details. | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ | |||
3489 3490 3491 3492 3493 3494 3495 | NULL, &t_count, errMsg); if (rc < 0) goto xsltNumberError; Tcl_SetHashValue (h, t_count); } } else { Tcl_DStringInit (&dStr); if (currentNode->nodeType == ELEMENT_NODE) { | > > > > | | | > | 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 | NULL, &t_count, errMsg); if (rc < 0) goto xsltNumberError; Tcl_SetHashValue (h, t_count); } } else { Tcl_DStringInit (&dStr); if (currentNode->nodeType == ELEMENT_NODE) { if (!currentNode->parentNode && currentNode == currentNode->ownerDocument->rootNode) { Tcl_DStringAppend (&dStr, "/", 1); } else { /* TODO: This is wrong. Instead this should use the "expanded-name" of the current node. */ Tcl_DStringAppend (&dStr, currentNode->nodeName, -1); } } else if (currentNode->nodeType == ATTRIBUTE_NODE) { Tcl_DStringAppend (&dStr, "@", 1); Tcl_DStringAppend (&dStr, currentNode->nodeName, -1); } else if (currentNode->nodeType == COMMENT_NODE) { Tcl_DStringAppend (&dStr, "comment()", -1); |
︙ | ︙ | |||
4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 | &rs, errMsg); CHECK_RC; TRACE1(" copyOf select='%s':\n", select); DBG(rsPrint(&rs)); if (rs.type == xNodeSetResult) { for (i=0; i<rs.nr_nodes; i++) { if (rs.nodes[i]->nodeType == ATTRIBUTE_NODE) { attr = (domAttrNode*)rs.nodes[i]; if (attr ->nodeFlags & IS_NS_NODE) { /* If someone selects explicitly namespace nodes to copy-of with e.g namespace::* (remember: @* doesn't select namespace nodes), we must this handle separately.*/ /* The xmlns:xml namespace node will always | > > > > > > | 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 | &rs, errMsg); CHECK_RC; TRACE1(" copyOf select='%s':\n", select); DBG(rsPrint(&rs)); if (rs.type == xNodeSetResult) { for (i=0; i<rs.nr_nodes; i++) { if (rs.nodes[i]->nodeType == ATTRIBUTE_NODE) { if (xs->lastNode->firstChild) { /* Adding an Attribute to an element after children have been added to it is an error. Ignore the attribute. */ continue; } attr = (domAttrNode*)rs.nodes[i]; if (attr ->nodeFlags & IS_NS_NODE) { /* If someone selects explicitly namespace nodes to copy-of with e.g namespace::* (remember: @* doesn't select namespace nodes), we must this handle separately.*/ /* The xmlns:xml namespace node will always |
︙ | ︙ | |||
4415 4416 4417 4418 4419 4420 4421 | " attribute \"name\".", errMsg); return -1; } rc = evalAttrTemplates( xs, context, currentNode, currentPos, str, &str2, errMsg); CHECK_RC; | | | 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 | " attribute \"name\".", errMsg); return -1; } rc = evalAttrTemplates( xs, context, currentNode, currentPos, str, &str2, errMsg); CHECK_RC; if (!domIsQNAME (str2)) { reportError (actionNode, "xsl:element: Element name is not a" " valid QName.", errMsg); FREE(str2); return -1; } out = NULL; nsStr = NULL; |
︙ | ︙ |
Changes to generic/domxslt.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /*---------------------------------------------------------------------------- | Copyright (c) 2000 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | $Id$ | | | A (partial) XSLT implementation for tDOM, according to the W3C | recommendation (16 Nov 1999, | http://www.w3.org/TR/1999/REC-xslt-19991116). | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /*---------------------------------------------------------------------------- | Copyright (c) 2000 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | $Id$ | | | A (partial) XSLT implementation for tDOM, according to the W3C | recommendation (16 Nov 1999, | http://www.w3.org/TR/1999/REC-xslt-19991116). | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/nodecmd.c.
1 2 3 4 5 6 7 | /*---------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +----------------------------------------------------------------------------- | | Rcsid: @(#)$Id$ | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /*---------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +----------------------------------------------------------------------------- | | Rcsid: @(#)$Id$ | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/nodecmd.h.
1 2 3 4 5 6 7 | /*---------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /*---------------------------------------------------------------------------- | Copyright (C) 1999 Jochen C. Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/tcldom.c.
1 2 3 4 5 6 7 8 9 10 11 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | A DOM implementation for Tcl using James Clark's expat XML parser | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | A DOM implementation for Tcl using James Clark's expat XML parser | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/tcldom.h.
1 2 3 4 5 6 7 8 9 10 11 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | A DOM implementation for Tcl using James Clark's expat XML parser | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | A DOM implementation for Tcl using James Clark's expat XML parser | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/tclexpat.c.
︙ | ︙ | |||
2379 2380 2381 2382 2383 2384 2385 | /* *---------------------------------------------------------------------------- * * TclGenExpatStartNamespaceDeclHandler -- * | | > > | 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 | /* *---------------------------------------------------------------------------- * * TclGenExpatStartNamespaceDeclHandler -- * * Called by expat for each namespace declaration command (and is * called before the start tag handler on which the namespace is * declared). * * Results: * None. * * Side Effects: * Callback scripts are invoked. * |
︙ | ︙ | |||
2411 2412 2413 2414 2415 2416 2417 | } activeTclHandlerSet = expat->firstTclHandlerSet; while (activeTclHandlerSet) { switch (activeTclHandlerSet->status) { case TCL_CONTINUE: | < < < < < < < < | 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 | } activeTclHandlerSet = expat->firstTclHandlerSet; while (activeTclHandlerSet) { switch (activeTclHandlerSet->status) { case TCL_CONTINUE: case TCL_BREAK: goto nextTcl; break; default: ; } |
︙ | ︙ | |||
2474 2475 2476 2477 2478 2479 2480 | } /* *---------------------------------------------------------------------------- * * TclGenExpatEndNamespaceDeclHandler -- * | | > | 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 | } /* *---------------------------------------------------------------------------- * * TclGenExpatEndNamespaceDeclHandler -- * * Called by expat for the end of scope for any namespace (and * after the handler for the according element tag. * * Results: * None. * * Side Effects: * Callback scripts are invoked. * |
︙ | ︙ | |||
2505 2506 2507 2508 2509 2510 2511 | } activeTclHandlerSet = expat->firstTclHandlerSet; while (activeTclHandlerSet) { switch (activeTclHandlerSet->status) { case TCL_CONTINUE: | < < < < < < < < < < | 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 | } activeTclHandlerSet = expat->firstTclHandlerSet; while (activeTclHandlerSet) { switch (activeTclHandlerSet->status) { case TCL_CONTINUE: case TCL_BREAK: goto nextTcl; break; default: ; } |
︙ | ︙ |
Changes to generic/tclpull.c.
1 2 3 4 5 6 | /*---------------------------------------------------------------------------- | Copyright (c) 2018 Rolf Ade ([email protected]) |----------------------------------------------------------------------------- | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /*---------------------------------------------------------------------------- | Copyright (c) 2018 Rolf Ade ([email protected]) |----------------------------------------------------------------------------- | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/tdomStubLib.c.
1 2 3 4 5 6 7 8 9 10 | /*---------------------------------------------------------------------------- | Copyright (c) 2007 Rolf Ade ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | Implements entry point, which has to be called by C coded extensions | to tDOM. Following http://wiki.tcl.tk/3358. | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /*---------------------------------------------------------------------------- | Copyright (c) 2007 Rolf Ade ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | Implements entry point, which has to be called by C coded extensions | to tDOM. Following http://wiki.tcl.tk/3358. | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to generic/tdominit.c.
1 2 3 4 5 6 7 8 9 10 11 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | A DOM implementation for Tcl using James Clark's expat XML parser | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | A DOM implementation for Tcl using James Clark's expat XML parser | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ | |||
64 65 66 67 68 69 70 | int Tdom_Init ( Tcl_Interp *interp /* Interpreter to initialize. */ ) { #ifdef USE_TCL_STUBS | | | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | int Tdom_Init ( Tcl_Interp *interp /* Interpreter to initialize. */ ) { #ifdef USE_TCL_STUBS Tcl_InitStubs(interp, "8.4", 0); #endif domModuleInitialize(); #ifdef TCL_THREADS tcldom_initialize(); #endif /* TCL_THREADS */ |
︙ | ︙ |
Changes to generic/xmlsimple.c.
1 2 3 4 5 6 7 8 9 10 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | | A simple (hopefully fast) parser to build up a DOM structure in memory. | Initially based on Richard Hipp's XML parser for TMML. | | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /*---------------------------------------------------------------------------- | Copyright (c) 1999 Jochen Loewer ([email protected]) |----------------------------------------------------------------------------- | | | A simple (hopefully fast) parser to build up a DOM structure in memory. | Initially based on Richard Hipp's XML parser for TMML. | | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ | |||
414 415 416 417 418 419 420 | } else { /*-------------------------------------------------------- | allocate new TEXT node \-------------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; | < | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | } else { /*-------------------------------------------------------- | allocate new TEXT node \-------------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = TEXT_NODE; tnode->ownerDocument = doc; tnode->nodeNumber = NODE_NO(doc); tnode->valueLength = (x - start); tnode->nodeValue = (char*)MALLOC((x - start)+1); memmove(tnode->nodeValue, start, (x - start)); *(tnode->nodeValue + (x - start)) = 0; tnode->parentNode = parent_node; |
︙ | ︙ | |||
501 502 503 504 505 506 507 | if (*x) { /*---------------------------------------------------- | allocate new COMMENT node for comments \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = COMMENT_NODE; | < | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | if (*x) { /*---------------------------------------------------- | allocate new COMMENT node for comments \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); tnode->nodeType = COMMENT_NODE; tnode->ownerDocument = doc; tnode->nodeNumber = NODE_NO(doc); tnode->parentNode = parent_node; tnode->valueLength = x - start - 4; tnode->nodeValue = (char*)MALLOC(tnode->valueLength+1); memmove(tnode->nodeValue, start+4, tnode->valueLength); *(tnode->nodeValue + tnode->valueLength) = 0; |
︙ | ︙ | |||
609 610 611 612 613 614 615 | \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); if (keepCDATA) tnode->nodeType = CDATA_SECTION_NODE; else tnode->nodeType = TEXT_NODE; | < | 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | \---------------------------------------------------*/ tnode = (domTextNode*) domAlloc(sizeof(domTextNode)); memset(tnode, 0, sizeof(domTextNode)); if (keepCDATA) tnode->nodeType = CDATA_SECTION_NODE; else tnode->nodeType = TEXT_NODE; tnode->ownerDocument = doc; tnode->nodeNumber = NODE_NO(doc); tnode->parentNode = parent_node; tnode->valueLength = (x - start); tnode->nodeValue = (char*)MALLOC((x - start)+1); memmove(tnode->nodeValue, start, (x - start)); *(tnode->nodeValue + (x - start)) = 0; |
︙ | ︙ | |||
654 655 656 657 658 659 660 | /*------------------------------------------------------------ | allocate new PI node for processing instruction section \-----------------------------------------------------------*/ pinode = (domProcessingInstructionNode*) domAlloc(sizeof(domProcessingInstructionNode)); memset(pinode, 0, sizeof(domProcessingInstructionNode)); pinode->nodeType = PROCESSING_INSTRUCTION_NODE; | < < | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 | /*------------------------------------------------------------ | allocate new PI node for processing instruction section \-----------------------------------------------------------*/ pinode = (domProcessingInstructionNode*) domAlloc(sizeof(domProcessingInstructionNode)); memset(pinode, 0, sizeof(domProcessingInstructionNode)); pinode->nodeType = PROCESSING_INSTRUCTION_NODE; pinode->ownerDocument = doc; pinode->nodeNumber = NODE_NO(doc); pinode->parentNode = parent_node; /*------------------------------------------------- | extract PI target \------------------------------------------------*/ |
︙ | ︙ | |||
735 736 737 738 739 740 741 | | create new DOM element node \-----------------------------------------------------*/ h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_tagNames), start+1, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; | < < | 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | | create new DOM element node \-----------------------------------------------------*/ h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_tagNames), start+1, &hnew); node = (domNode*) domAlloc(sizeof(domNode)); memset(node, 0, sizeof(domNode)); node->nodeType = ELEMENT_NODE; node->nodeName = (char *)&(h->key); node->ownerDocument = doc; node->nodeNumber = NODE_NO(doc); node->ownerDocument = doc; if (parent_node == NULL) { if (doc->rootNode->lastChild) { |
︙ | ︙ | |||
909 910 911 912 913 914 915 | h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_attrNames), ArgName, &hnew); attrnode = (domAttrNode*) domAlloc(sizeof(domAttrNode)); memset(attrnode, 0, sizeof(domAttrNode)); attrnode->parentNode = node; attrnode->nodeName = (char *)&(h->key); attrnode->nodeType = ATTRIBUTE_NODE; | < | 902 903 904 905 906 907 908 909 910 911 912 913 914 915 | h = Tcl_CreateHashEntry(&HASHTAB(doc,tdom_attrNames), ArgName, &hnew); attrnode = (domAttrNode*) domAlloc(sizeof(domAttrNode)); memset(attrnode, 0, sizeof(domAttrNode)); attrnode->parentNode = node; attrnode->nodeName = (char *)&(h->key); attrnode->nodeType = ATTRIBUTE_NODE; attrnode->nodeValue = (char*)MALLOC(nArgVal+1); attrnode->valueLength = nArgVal; memmove(attrnode->nodeValue, ArgVal, nArgVal); *(attrnode->nodeValue + nArgVal) = 0; if (ampersandSeen) { if (!TranslateEntityRefs(attrnode->nodeValue, &(attrnode->valueLength) )) { |
︙ | ︙ |
Changes to lib/tdom.tcl.
1 2 3 4 5 6 7 8 9 10 11 | #---------------------------------------------------------------------------- # Copyright (c) 1999 Jochen Loewer ([email protected]) #---------------------------------------------------------------------------- # # $Id$ # # # The higher level functions of tDOM written in plain Tcl. # # # The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #---------------------------------------------------------------------------- # Copyright (c) 1999 Jochen Loewer ([email protected]) #---------------------------------------------------------------------------- # # $Id$ # # # The higher level functions of tDOM written in plain Tcl. # # # The contents of this file are subject to the Mozilla Public License # Version 2.0 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations # under the License. |
︙ | ︙ |
Changes to tests/OASIS-suite.tcl.
︙ | ︙ | |||
109 110 111 112 113 114 115 | set notFailed 0 proc extRefHandler {base systemId publicId} { variable usageCounter set absolutURI [uri::resolve $base $systemId] incr usageCounter($absolutURI) | | | | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | set notFailed 0 proc extRefHandler {base systemId publicId} { variable usageCounter set absolutURI [uri::resolve $base $systemId] incr usageCounter($absolutURI) if {$usageCounter($absolutURI) > 50} { error "Circular import/include?" } switch $systemId { "notfound.xml" { return [list string $absolutURI "<notfound/>"] } } array set uriData [uri::split $absolutURI] |
︙ | ︙ | |||
360 361 362 363 364 365 366 | set refinfosetdoc [$infoset $refdoc] set resultinfosetdoc [$infoset $resultDoc] if {[$refinfosetdoc asXML -indent none] ne [$resultinfosetdoc asXML -indent none]} { incr compareDIFF log 1 "Result and ref differ." log 2 "Ref:" | | | | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | set refinfosetdoc [$infoset $refdoc] set resultinfosetdoc [$infoset $resultDoc] if {[$refinfosetdoc asXML -indent none] ne [$resultinfosetdoc asXML -indent none]} { incr compareDIFF log 1 "Result and ref differ." log 2 "Ref:" log 2 [$refinfosetdoc asXML -indent none] log 2 "Result:" log 2 [$resultinfosetdoc asXML -indent none] } else { incr compareOK } $refinfosetdoc delete $resultinfosetdoc delete } else { incr compareFAILED |
︙ | ︙ |
Changes to tests/all.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # all.tcl -- # # This file contains a top-level script to run all of the Tcl # tests. Execute it by invoking "tclsh all.test". # # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # # RCS: @(#) $Id$ # source [file join [file dir [info script]] loadtdom.tcl] | < < < < < | < < < < < < | | | < | < < < | < < < < < < < | < < < < < < < < < < < < < < < | < < < | < < < | < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # all.tcl -- # # This file contains a top-level script to run all of the Tcl # tests. Execute it by invoking "tclsh all.test". # # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # # RCS: @(#) $Id$ # source [file join [file dir [info script]] loadtdom.tcl] if {[info procs ::tdom::extRefHandler] != ""} { testConstraint need_uri 1 } singleProcess 1 if {$tcl_version < 8.5} { # We still support 8.4 to some degree testsDirectory [file dirname [info script]] } else { configure {*}$argv -testdir [file dirname [info script]] } runAllTests # See http://mini.net/tcl/3248 for an explanation. proc exit args {} |
Changes to tests/dom.test.
︙ | ︙ | |||
844 845 846 847 848 849 850 | set nameStartChars [lsort -command sortCmd \ [concat $BaseChar $Ideographic 0x005F 0x003A]] # Append stop char needed by the test code to work properly. lappend nameStartChars 0x10000 | | | 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 | set nameStartChars [lsort -command sortCmd \ [concat $BaseChar $Ideographic 0x005F 0x003A]] # Append stop char needed by the test code to work properly. lappend nameStartChars 0x10000 test dom-3.8 {isName} {longRunning} { set ind 0 set nr 0 while {$nr < 65536} { set range [lindex $nameStartChars $ind] incr ind if {[llength $range] == 2} { foreach {min max} $range break |
︙ | ︙ | |||
880 881 882 883 884 885 886 | set nameChars [lsort -command sortCmd \ [concat $BaseChar $Ideographic $Digit 0x002E 0x002D 0x005F 0x003A \ $CombiningChar $Extender]] # Append stop char needed by the test code to work properly. lappend nameChars 0x10000 | | | 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 | set nameChars [lsort -command sortCmd \ [concat $BaseChar $Ideographic $Digit 0x002E 0x002D 0x005F 0x003A \ $CombiningChar $Extender]] # Append stop char needed by the test code to work properly. lappend nameChars 0x10000 test dom-3.9 {isName} { set ind 0 set nr 0 while {$nr < 65536} { set range [lindex $nameChars $ind] incr ind if {[llength $range] == 2} { foreach {min max} $range break |
︙ | ︙ | |||
991 992 993 994 995 996 997 | dom isQName 1:foo } {0} set XMLChars { 0x9 0xA 0xD {0x20 0xD7FF} {0xE000 0xFFFD} {0x10000 0x10FFFF} } | | | 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 | dom isQName 1:foo } {0} set XMLChars { 0x9 0xA 0xD {0x20 0xD7FF} {0xE000 0xFFFD} {0x10000 0x10FFFF} } test dom-3.27 {isCharData} {longRunning} { set ind 0 set nr 1 while {$nr < 65536} { set range [lindex $XMLChars $ind] incr ind if {[llength $range] == 2} { foreach {min max} $range break |
︙ | ︙ | |||
1061 1062 1063 1064 1065 1066 1067 | dom isCDATA "invalid: ]]>" } {0} test dom-3.37 {isCDATA} { dom isCDATA "valid: ]]> " } {0} | | | 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 | dom isCDATA "invalid: ]]>" } {0} test dom-3.37 {isCDATA} { dom isCDATA "valid: ]]> " } {0} test dom-3.38 {isCDATA} { dom isCDATA "\ud7fa\ud7fb\ud7fc\ud7fd\ud7fe\ud7ff]]>" } {0} test dom-3.39 {isPIValue} { dom isPIValue "some processing instruction data" } {1} |
︙ | ︙ |
Changes to tests/domDoc.test.
︙ | ︙ | |||
33 34 35 36 37 38 39 | # domDoc-27.*: deleteXPathCache # domDoc-28.*: createElementNS # # Copyright (c) 2004 - 2007 Rolf Ade. source [file join [file dir [info script]] loadtdom.tcl] | | | | | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | # domDoc-27.*: deleteXPathCache # domDoc-28.*: createElementNS # # Copyright (c) 2004 - 2007 Rolf Ade. source [file join [file dir [info script]] loadtdom.tcl] test domDoc-1.1 {asXML -escapeNonASCII} { set doc [dom parse [tdom::xmlReadFile \ [file join [file dir [info script]] data/i18n_1.xml]]] set result [$doc asXML -escapeNonASCII] $doc delete set result } {<test>абвгдежзий</test> } test domDoc-1.2 {asXML -escapeNonASCII; comments and PI's are not altered} { set doc [dom parse [tdom::xmlReadFile \ [file join [file dir [info script]] data/i18n_2.xml]]] set result [$doc asXML -indent none -escapeNonASCII] $doc delete set result } "<root withUmlauts=\"äöüß\"><!-- A comment with german umlauts: \u00E4\u00F6\u00FC\u00DF --><?\u00E4\u00F6\u00FC\u00DF A processing node with german umlauts?> german umlauts: äöüß </root>" test domDoc-1.3 {asHTML -escapeNonASCII -htmlEntities} { set doc [dom parse {<html><body>äü„‟†</body></html>}] set result [$doc asHTML -escapeNonASCII -htmlEntities] $doc delete set result } {<html><body>äü„‟†</body></html>} |
︙ | ︙ |
Changes to tests/domjson.test.
︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # json-7.*: jsonType # json-8.*: appendFromScript # json-9.*: cloneNode # Copyright (c) 2017 Rolf Ade. source [file join [file dir [info script]] loadtdom.tcl] namespace eval nodeCmds { dom createNodeCmd elementNode e1 dom createNodeCmd -jsonType ARRAY elementNode jae1 dom createNodeCmd elementNode e2 dom createNodeCmd commentNode c dom createNodeCmd textNode t | > > > > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # json-7.*: jsonType # json-8.*: appendFromScript # json-9.*: cloneNode # Copyright (c) 2017 Rolf Ade. source [file join [file dir [info script]] loadtdom.tcl] testConstraint needExpand 1 if {$tcl_version < 8.5} { testConstraint needExpand 0 } namespace eval nodeCmds { dom createNodeCmd elementNode e1 dom createNodeCmd -jsonType ARRAY elementNode jae1 dom createNodeCmd elementNode e2 dom createNodeCmd commentNode c dom createNodeCmd textNode t |
︙ | ︙ |
Changes to tests/domnamespace.test.
︙ | ︙ | |||
10 11 12 13 14 15 16 | # # Copyright (c) 2002 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # # Copyright (c) 2002 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] test domnamespace-1.1 {multiple definition of the same namespace (same prefix/uri)} { set ch [open [file join [pwd] [file dir [info script]] data/REC-xslt-19991116.xml]] fconfigure $ch -encoding iso8859-1 set doc [dom parse -channel $ch] set root [$doc documentElement] set nodes [$root selectNodes //e:element-syntax] $doc delete llength $nodes |
︙ | ︙ |
Changes to tests/html5reader.test.
︙ | ︙ | |||
10 11 12 13 14 15 16 | # # Copyright (c) 2017 Rolf Ade. source [file join [file dir [info script]] loadtdom.tcl] testConstraint html5 [dom featureinfo html5] | | | | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | # # Copyright (c) 2017 Rolf Ade. source [file join [file dir [info script]] loadtdom.tcl] testConstraint html5 [dom featureinfo html5] test html5-1.1 {HTML character entities} {html5} { set doc [dom parse -html5 -ignorexmlns {<html><body> ¡Äü</body></html>}] set root [$doc documentElement] set body [$root selectNodes body] set result [$body text] $doc delete set result } "\u00A0\u00A1\u00c4\u00fc" test html5-1.2 {character entities} {html5} { set doc [dom parse -html5 -ignorexmlns {<html><body>ÖÄÄ</body></html>}] set root [$doc documentElement] set body [$root selectNodes body] set result [$body text] $doc delete set result } "\u00d6\u00c4\u00c4" test html5-1.3 {character entities} {html5} { set doc [dom parse -html5 -ignorexmlns {<html>€∋</html>}] set root [$doc documentElement] set body [$root selectNodes body] set result [$body text] $doc delete set result } "\u20ac\u220b" test html5-1.4 {invalid characters} {html5} { set doc [dom parse -html5 -ignorexmlns {<html>foo;</html>}] set root [$doc documentElement] set body [$root selectNodes body] set result [$body text] $doc delete set result } "\u0001\u0002\u0003\u0004foo;" |
︙ | ︙ |
Changes to tests/htmlreader.test.
︙ | ︙ | |||
9 10 11 12 13 14 15 | # # Copyright (c) 2002-2007 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] | | | | | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # # Copyright (c) 2002-2007 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] test html-1.1 {HTML character entities} { set doc [dom parse -html {<html><body> ¡Äü</body></html>}] set root [$doc documentElement] set body [$root firstChild] set result [$body text] $doc delete set result } "\u00A0\u00A1\u00c4\u00fc" test html-1.2 {character entities} { set doc [dom parse -html {<html><body>ÖÄÄ</body></html>}] set root [$doc documentElement] set body [$root firstChild] set result [$body text] $doc delete set result } "\u00d6\u00c4\u00c4" test html-1.3 {character entities} { set doc [dom parse -html {<html>€∋</html>}] set root [$doc documentElement] set result [$root text] $doc delete set result } "\u20ac\u220b" |
︙ | ︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | test html-1.6 {Numeric character entity} { set doc [dom parse -html {<html>�</html>}] set root [$doc documentElement] set result [$root text] $doc delete set result } "�" test html-2.1 {not closed p tags} { set doc [dom parse -html { <html><body><p>Para 1<p>Para 2<p>Para 3</body></html> }] set result [$doc asXML -indent none] $doc delete | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | test html-1.6 {Numeric character entity} { set doc [dom parse -html {<html>�</html>}] set root [$doc documentElement] set result [$root text] $doc delete set result } "�" test html-1.7 {character entities} { set doc [dom parse -html {<html>¼</html>}] set root [$doc documentElement] set result [$root text] $doc delete set result } "\u00bc" proc toutf8 c { set s [encoding convertto utf-8 $c] binary scan $s H* x regsub -all -expanded {..} $x {\x&} } test html-1.8 {character entities} { set result "" foreach {entity byteseq} { "amp" "\\x26" "lt" "\\x3C" "gt" "\\x3E" "apos" "\\x27" "quot" "\\x22" "nbsp" "\\xC2\\xA0" "iexcl" "\\xC2\\xA1" "cent" "\\xC2\\xA2" "pound" "\\xC2\\xA3" "curren" "\\xC2\\xA4" "yen" "\\xC2\\xA5" "brvbar" "\\xC2\\xA6" "sect" "\\xC2\\xA7" "uml" "\\xC2\\xA8" "copy" "\\xC2\\xA9" "ordf" "\\xC2\\xAA" "laquo" "\\xC2\\xAB" "not" "\\xC2\\xAC" "shy" "\\xC2\\xAD" "reg" "\\xC2\\xAE" "macr" "\\xC2\\xAF" "deg" "\\xC2\\xB0" "plusmn" "\\xC2\\xB1" "sup2" "\\xC2\\xB2" "sup3" "\\xC2\\xB3" "acute" "\\xC2\\xB4" "micro" "\\xC2\\xB5" "para" "\\xC2\\xB6" "middot" "\\xC2\\xB7" "cedil" "\\xC2\\xB8" "sup1" "\\xC2\\xB9" "ordm" "\\xC2\\xBA" "raquo" "\\xC2\\xBB" "frac14" "\\xC2\\xBC" "frac12" "\\xC2\\xBD" "frac34" "\\xC2\\xBE" "iquest" "\\xC2\\xBF" "Agrave" "\\xC3\\x80" "Aacute" "\\xC3\\x81" "Acirc" "\\xC3\\x82" "Atilde" "\\xC3\\x83" "Auml" "\\xC3\\x84" "Aring" "\\xC3\\x85" "AElig" "\\xC3\\x86" "Ccedil" "\\xC3\\x87" "Egrave" "\\xC3\\x88" "Eacute" "\\xC3\\x89" "Ecirc" "\\xC3\\x8A" "Euml" "\\xC3\\x8B" "Igrave" "\\xC3\\x8C" "Iacute" "\\xC3\\x8D" "Icirc" "\\xC3\\x8E" "Iuml" "\\xC3\\x8F" "ETH" "\\xC3\\x90" "Ntilde" "\\xC3\\x91" "Ograve" "\\xC3\\x92" "Oacute" "\\xC3\\x93" "Ocirc" "\\xC3\\x94" "Otilde" "\\xC3\\x95" "Ouml" "\\xC3\\x96" "times" "\\xC3\\x97" "Oslash" "\\xC3\\x98" "Ugrave" "\\xC3\\x99" "Uacute" "\\xC3\\x9A" "Ucirc" "\\xC3\\x9B" "Uuml" "\\xC3\\x9C" "Yacute" "\\xC3\\x9D" "THORN" "\\xC3\\x9E" "szlig" "\\xC3\\x9F" "agrave" "\\xC3\\xA0" "aacute" "\\xC3\\xA1" "acirc" "\\xC3\\xA2" "atilde" "\\xC3\\xA3" "auml" "\\xC3\\xA4" "aring" "\\xC3\\xA5" "aelig" "\\xC3\\xA6" "ccedil" "\\xC3\\xA7" "egrave" "\\xC3\\xA8" "eacute" "\\xC3\\xA9" "ecirc" "\\xC3\\xAA" "euml" "\\xC3\\xAB" "igrave" "\\xC3\\xAC" "iacute" "\\xC3\\xAD" "icirc" "\\xC3\\xAE" "iuml" "\\xC3\\xAF" "eth" "\\xC3\\xB0" "ntilde" "\\xC3\\xB1" "ograve" "\\xC3\\xB2" "oacute" "\\xC3\\xB3" "ocirc" "\\xC3\\xB4" "otilde" "\\xC3\\xB5" "ouml" "\\xC3\\xB6" "divide" "\\xC3\\xB7" "oslash" "\\xC3\\xB8" "ugrave" "\\xC3\\xB9" "uacute" "\\xC3\\xBA" "ucirc" "\\xC3\\xBB" "uuml" "\\xC3\\xBC" "yacute" "\\xC3\\xBD" "thorn" "\\xC3\\xBE" "yuml" "\\xC3\\xBF" "OElig" "\\xC5\\x92" "oelig" "\\xC5\\x93" "Scaron" "\\xC5\\xA0" "scaron" "\\xC5\\xA1" "Yuml" "\\xC5\\xB8" "circ" "\\xCB\\x86" "tilde" "\\xCB\\x9C" "ensp" "\\xE2\\x80\\x82" "emsp" "\\xE2\\x80\\x83" "thinsp" "\\xE2\\x80\\x89" "zwnj" "\\xE2\\x81\\xB0" "zwj" "\\xE2\\x80\\x8D" "lrm" "\\xE2\\x80\\x8E" "rlm" "\\xE2\\x80\\x8F" "ndash" "\\xE2\\x80\\x93" "mdash" "\\xE2\\x80\\x94" "lsquo" "\\xE2\\x80\\x98" "rsquo" "\\xE2\\x80\\x99" "sbquo" "\\xE2\\x80\\x9A" "ldquo" "\\xE2\\x80\\x9C" "rdquo" "\\xE2\\x80\\x9D" "bdquo" "\\xE2\\x80\\x9E" "dagger" "\\xE2\\x80\\xA0" "Dagger" "\\xE2\\x80\\xA1" "permil" "\\xE2\\x80\\xB0" "lsaquo" "\\xE2\\x80\\xB9" "rsaquo" "\\xE2\\x80\\xBA" "euro" "\\xE2\\x82\\xAC" "fnof" "\\xC6\\x92" "Alpha" "\\xCE\\x91" "Beta" "\\xCE\\x92" "Gamma" "\\xCE\\x93" "Delta" "\\xCE\\x94" "Epsilon" "\\xCE\\x95" "Zeta" "\\xCE\\x96" "Eta" "\\xCE\\x97" "Theta" "\\xCE\\x98" "Iota" "\\xCE\\x99" "Kappa" "\\xCE\\x9A" "Lambda" "\\xCE\\x9B" "Mu" "\\xCE\\x9C" "Nu" "\\xCE\\x9D" "Xi" "\\xCE\\x9E" "Omicron" "\\xCE\\x9F" "Pi" "\\xCE\\xA0" "Rho" "\\xCE\\xA1" "Sigma" "\\xCE\\xA3" "Tau" "\\xCE\\xA4" "Upsilon" "\\xCE\\xA5" "Phi" "\\xCE\\xA6" "Chi" "\\xCE\\xA7" "Psi" "\\xCE\\xA8" "Omega" "\\xCE\\xA9" "alpha" "\\xCE\\xB1" "beta" "\\xCE\\xB2" "gamma" "\\xCE\\xB3" "delta" "\\xCE\\xB4" "epsilon" "\\xCE\\xB5" "zeta" "\\xCE\\xB6" "eta" "\\xCE\\xB7" "theta" "\\xCE\\xB8" "iota" "\\xCE\\xB9" "kappa" "\\xCE\\xBA" "lambda" "\\xCE\\xBB" "mu" "\\xCE\\xBC" "nu" "\\xCE\\xBD" "xi" "\\xCE\\xBE" "omicron" "\\xCE\\xBF" "pi" "\\xCF\\x80" "rho" "\\xCF\\x81" "sigmaf" "\\xCF\\x82" "sigma" "\\xCF\\x83" "tau" "\\xCF\\x84" "upsilon" "\\xCF\\x85" "phi" "\\xCF\\x86" "chi" "\\xCF\\x87" "psi" "\\xCF\\x88" "omega" "\\xCF\\x89" "thetasym" "\\xCF\\x91" "upsih" "\\xCF\\x92" "piv" "\\xCF\\x96" "bull" "\\xE2\\x80\\xA2" "hellip" "\\xE2\\x80\\xA6" "prime" "\\xE2\\x80\\xB2" "Prime" "\\xE2\\x80\\xB3" "oline" "\\xE2\\x80\\xBE" "frasl" "\\xE2\\x81\\x84" "weierp" "\\xE2\\x84\\x98" "image" "\\xE2\\x84\\x91" "real" "\\xE2\\x84\\x9C" "trade" "\\xE2\\x84\\xA2" "alefsym" "\\xE2\\x84\\xB5" "larr" "\\xE2\\x86\\x90" "uarr" "\\xE2\\x86\\x91" "rarr" "\\xE2\\x86\\x92" "darr" "\\xE2\\x86\\x93" "harr" "\\xE2\\x86\\x94" "crarr" "\\xE2\\x86\\xB5" "lArr" "\\xE2\\x87\\x90" "uArr" "\\xE2\\x87\\x91" "rArr" "\\xE2\\x87\\x92" "dArr" "\\xE2\\x87\\x93" "hArr" "\\xE2\\x87\\x94" "forall" "\\xE2\\x88\\x80" "part" "\\xE2\\x88\\x82" "exist" "\\xE2\\x88\\x83" "empty" "\\xE2\\x88\\x85" "nabla" "\\xE2\\x88\\x87" "isin" "\\xE2\\x88\\x88" "notin" "\\xE2\\x88\\x89" "ni" "\\xE2\\x88\\x8B" "prod" "\\xE2\\x88\\x8F" "sum" "\\xE2\\x88\\x91" "minus" "\\xE2\\x88\\x92" "lowast" "\\xE2\\x88\\x97" "radic" "\\xE2\\x88\\x9A" "prop" "\\xE2\\x88\\x9D" "infin" "\\xE2\\x88\\x9E" "ang" "\\xE2\\x88\\xA0" "and" "\\xE2\\x88\\xA7" "or" "\\xE2\\x88\\xA8" "cap" "\\xE2\\x88\\xA9" "cup" "\\xE2\\x88\\xAA" "int" "\\xE2\\x88\\xAB" "there4" "\\xE2\\x88\\xB4" "sim" "\\xE2\\x88\\xBC" "cong" "\\xE2\\x89\\x85" "asymp" "\\xE2\\x89\\x88" "ne" "\\xE2\\x89\\xA0" "equiv" "\\xE2\\x89\\xA1" "le" "\\xE2\\x89\\xA4" "ge" "\\xE2\\x89\\xA5" "sub" "\\xE2\\x8A\\x82" "sup" "\\xE2\\x8A\\x83" "nsub" "\\xE2\\x8A\\x84" "sube" "\\xE2\\x8A\\x86" "supe" "\\xE2\\x8A\\x87" "oplus" "\\xE2\\x8A\\x95" "otimes" "\\xE2\\x8A\\x97" "perp" "\\xE2\\x8A\\xA5" "sdot" "\\xE2\\x8B\\x85" "lceil" "\\xE2\\x8C\\x88" "rceil" "\\xE2\\x8C\\x89" "lfloor" "\\xE2\\x8C\\x8A" "rfloor" "\\xE2\\x8C\\x8B" "lang" "\\xE2\\x8C\\xA9" "rang" "\\xE2\\x8C\\xAA" "loz" "\\xE2\\x97\\x8A" "spades" "\\xE2\\x99\\xA0" "clubs" "\\xE2\\x99\\xA3" "hearts" "\\xE2\\x99\\xA5" "diams" "\\xE2\\x99\\xA6" } { set html "<html><body>&$entity;</body></html>" set doc [dom parse -html $html] set root [$doc documentElement] set body [$root firstChild] if {[toutf8 [$body text]] ne [string tolower $byteseq]} { lappend result $entity [toutf8 [$body text]] [string tolower $byteseq] } $doc delete } set result } "" test html-2.1 {not closed p tags} { set doc [dom parse -html { <html><body><p>Para 1<p>Para 2<p>Para 3</body></html> }] set result [$doc asXML -indent none] $doc delete |
︙ | ︙ | |||
199 200 201 202 203 204 205 | </select></form></body> </html>} test html-3.1 {Bad data} { set data {line 6 column 17 - Warning: <script> lacks "type" attribute line 10 column 17 - Warning: <script> lacks "type" attribute line 11 column 17 - Warning: <table> lacks "summary" attribute} | | > > | > | > > | > | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | </select></form></body> </html>} test html-3.1 {Bad data} { set data {line 6 column 17 - Warning: <script> lacks "type" attribute line 10 column 17 - Warning: <script> lacks "type" attribute line 11 column 17 - Warning: <table> lacks "summary" attribute} set doc [dom parse -html $data] set result [$doc asHTML] $doc delete set result } {<html><script></script></html>} test html-3.2 {Bad data} { set doc [dom parse -html {<a>}] set result [$doc asHTML] $doc delete set result } {<html><a></a></html>} test html-4.1 {Tag name case normalization} { set doc [dom parse -html {<HtmL><boDY></BODy></HTml>}] set result [$doc asHTML] $doc delete set result } {<html><body></body></html>} |
︙ | ︙ |
Changes to tests/i18n.test.
1 2 3 4 5 6 7 8 9 10 11 | # Features covered: international issues # # Copyright (c) 2002 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] testConstraint beyondBMP [expr {[dom featureinfo TCL_UTF_MAX] > 3}] testConstraint 8.6 [package vsatisfies [package present Tcl] 8.6] | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # Features covered: international issues # # Copyright (c) 2002 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] testConstraint beyondBMP [expr {[dom featureinfo TCL_UTF_MAX] > 3}] testConstraint 8.6 [package vsatisfies [package present Tcl] 8.6] test i18n-1.1 {parse utf-8 string} { set russian "\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439" set doc [dom parse "<test>$russian</test>"] set root [$doc documentElement] set text [$root text] $doc delete string compare $text "\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439" } {0} test i18n-1.2 {parse utf-8 channel} { set fd [open [file join [pwd] [file dir [info script]] data/i18n_1.xml]] fconfigure $fd -encoding utf-8 set doc [dom parse -channel $fd] close $fd set root [$doc documentElement] set text [$root text] $doc delete string compare $text "\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439" } {0} test i18n-1.3 {parse utf-8 readFile} { set doc [dom parse [::tdom::xmlReadFile [file join [pwd] [file dir [info script]] data/i18n_1.xml]]] set root [$doc documentElement] set text [$root text] $doc delete string compare $text "\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439" } {0} |
︙ | ︙ |
Changes to tests/loadtdom.tcl.
1 2 3 4 5 6 7 8 | # loadtdom.tcl -- # # This file is [source]d by all.tcl and all test files, to ensure, that # the tcltest package and the lastest tdom build is present. # # RCS: @(#) $Id$ # | > > > > > > | | | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # loadtdom.tcl -- # # This file is [source]d by all.tcl and all test files, to ensure, that # the tcltest package and the lastest tdom build is present. # # RCS: @(#) $Id$ # if {$tcl_version < 8.5} { # We still support 8.4 to some degree package require Tcl 8.4 } else { package require Tcl 8.4- } package require tcltest 2.2 namespace import ::tcltest::* if {[catch {package require -exact tdom 0.9.2}]} { if {[catch {load [file join [file dir [info script]] ../unix/libtdom0.9.2.so]}]} { error "Unable to load the appropriate tDOM version!" } } if {[info commands ::tdom::xmlReadFile] == ""} { # tcldomsh without the script library. Source the lib. source [file join [file dir [info script]] ../lib tdom.tcl] } |
Changes to tests/pullparser.test.
︙ | ︙ | |||
129 130 131 132 133 134 135 | pp delete } proc fdata {file} { file join [file dir [info script]] data/$file } | | | | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | pp delete } proc fdata {file} { file join [file dir [info script]] data/$file } test pp-2.1 {dom/pull comparsion: mondial-europe.xml} {longRunning} { comparewithDOM [fdata mondial-europe.xml] inputfile } 1 test pp-2.2 {dom/pull comparsion: books.xml} { comparewithDOM [fdata books.xml] inputfile } 1 test pp-2.3 {dom/pull comparsion: i18n_1.xml} { comparewithDOM [fdata i18n_1.xml] inputfile } 1 test pp-2.4 {dom/pull comparsion: i18n_2.xml} { comparewithDOM [fdata i18n_2.xml] inputfile } 1 test pp-2.5 {dom/pull comparsion: REC-xslt-19991116.xml} {longRunning} { comparewithDOM [fdata REC-xslt-19991116.xml] inputfile } 1 test pp-2.6 {dom/pull comparsion: xslt_1.xsl} { comparewithDOM [fdata xslt_1.xsl] inputfile } 1 |
︙ | ︙ | |||
236 237 238 239 240 241 242 | return 0 } pushparser free pullparser delete } | | | | 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | return 0 } pushparser free pullparser delete } test pp-2.10 {expat/pull comparsion: mondial-europe.xml} {longRunning} { comparewithExpat [fdata mondial-europe.xml] file } 1 test pp-2.11 {expat/pull comparsion: books.xml} { comparewithExpat [fdata books.xml] file } 1 test pp-2.12 {expat/pull comparsion: i18n_1.xml} { comparewithExpat [fdata i18n_1.xml] file } 1 test pp-2.13 {expat/pull comparsion: i18n_2.xml} { comparewithExpat [fdata i18n_2.xml] file } 1 test pp-2.14 {expat/pull comparsion: REC-xslt-19991116.xml} {longRunning} { comparewithExpat [fdata REC-xslt-19991116.xml] file } 1 test pp-2.15 {expat/pull comparsion: xslt_1.xsl} { comparewithExpat [fdata xslt_1.xsl] file } 1 |
︙ | ︙ |
Changes to tests/xmlsimple.test.
︙ | ︙ | |||
195 196 197 198 199 200 201 | set doc [dom parse -simple {<doc>AB</doc>}] set root [$doc documentElement] set result [$root text] $doc delete set result } {AB} | | | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | set doc [dom parse -simple {<doc>AB</doc>}] set root [$doc documentElement] set result [$root text] $doc delete set result } {AB} test simple-2.3 {character entities} { set doc [dom parse -simple {<doc>ÖÄÄ</doc>}] set root [$doc documentElement] set result [$root text] $doc delete set result } "\u00d6\u00c4\u00c4" |
︙ | ︙ |
Changes to tests/xpath.test.
︙ | ︙ | |||
1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 | test xpath-7.9 {Attribute node as context node of an id() call} -setup { set doc [dom parse {<doc foo="bar"/>}] } -body { $doc selectNodes {doc/@foo[id(.)]} } -cleanup { $doc delete } -result "" # cleanup ::tcltest::cleanupTests return | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 | test xpath-7.9 {Attribute node as context node of an id() call} -setup { set doc [dom parse {<doc foo="bar"/>}] } -body { $doc selectNodes {doc/@foo[id(.)]} } -cleanup { $doc delete } -result "" test xpath-7.10 {processing-instruction with literal argument} -setup { set doc [dom parse {<h> <?mypi whatever?> <stuff>does not matter</stuff> </h> }] } -body { $doc selectNodes //processing-instruction('dontexist') } -cleanup { $doc delete } -result {} test xpath-7.11 {processing-instruction with literal argument} -setup { set doc [dom parse {<h> <?mypi whatever?> <stuff>does not matter</stuff> </h> }] } -body { [$doc selectNodes //processing-instruction('mypi')] asXML -indent none } -cleanup { $doc delete } -result {<?mypi whatever?>} test xpath-7.12 {string value of processing-instruction} -setup { set doc [dom parse {<h> <?mypi whatever?> <stuff>does not matter</stuff> </h> }] } -body { $doc selectNodes string(//processing-instruction('mypi')) } -cleanup { $doc delete } -result {whatever} test xpath-7.13 {string value of processing-instruction} -setup { set doc [dom parse {<h> <?mypi whatever ?> <stuff>does not matter</stuff> </h> }] } -body { $doc selectNodes string(//processing-instruction('mypi')) } -cleanup { $doc delete } -result "whatever " test xpath-7.14 {local-name value of processing-instruction} -setup { set doc [dom parse {<h> <?mypi whatever ?> <stuff>does not matter</stuff> </h> }] } -body { $doc selectNodes local-name(//processing-instruction('mypi')) } -cleanup { $doc delete } -result {mypi} # cleanup ::tcltest::cleanupTests return |
Changes to tests/xslt.test.
︙ | ︙ | |||
20 21 22 23 24 25 26 | # # Copyright (c) 2002 - 2005, 2013 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # # Copyright (c) 2002 - 2005, 2013 Rolf Ade. # # RCS: @(#) $Id$ source [file join [file dir [info script]] loadtdom.tcl] test xslt-1.1 {unicode chars outside of US-ASCII in var name} { set xml [dom parse {<root/>}] set xslt [dom parse [tdom::xmlReadFile [file join [pwd] [file dir [info script]] data/xslt_1.xsl]]] set xmlroot [$xml documentElement] $xmlroot xslt $xslt resultDoc set resultroot [$resultDoc documentElement] set result [$resultroot asXML] $xml delete |
︙ | ︙ |
Changes to unix/tclAppInit.c.
1 2 3 4 5 6 7 8 9 10 | /*---------------------------------------------------------------------------- | Copyright (c) 2007 Rolf Ade ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | Main file for a standalone tclsh with tDOM build in ('big tclsh'). | | The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /*---------------------------------------------------------------------------- | Copyright (c) 2007 Rolf Ade ([email protected]) +----------------------------------------------------------------------------- | | $Id$ | | | Main file for a standalone tclsh with tDOM build in ('big tclsh'). | | The contents of this file are subject to the Mozilla Public License | Version 2.0 (the "License"); you may not use this file except in | compliance with the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | License for the specific language governing rights and limitations | under the License. |
︙ | ︙ |
Changes to win/pkgIndex.tcl.
1 2 3 | # tDOM Tcl package index file package ifneeded tdom 0.9.1 \ | | | 1 2 3 4 5 | # tDOM Tcl package index file package ifneeded tdom 0.9.1 \ "[list load [file join $dir tdom092[info sharedlibextension] ] tdom];\ [list source [file join $dir tdom.tcl]]" |
Changes to xe/xe.
1 2 3 4 5 6 7 8 9 | #!/opt/tcl/bin/wish #---------------------------------------------------------------------------- # Copyright (c) 1999 - 2000 Jochen C. Loewer ([email protected]) #---------------------------------------------------------------------------- # # A XML/DOM/XPath evaluator/viewer... featuring the Tk text widget. # # # The contents of this file are subject to the Mozilla Public License | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/opt/tcl/bin/wish #---------------------------------------------------------------------------- # Copyright (c) 1999 - 2000 Jochen C. Loewer ([email protected]) #---------------------------------------------------------------------------- # # A XML/DOM/XPath evaluator/viewer... featuring the Tk text widget. # # # The contents of this file are subject to the Mozilla Public License # Version 2.0 (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS" # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the # License for the specific language governing rights and limitations # under the License. |
︙ | ︙ |