This is an automated email from the git hooks/post-receive script.
sparks pushed a commit to branch master
in repository defensive-coding-guide.
commit c86199551502da53adaffd072ec2e1c36e73ee60
Author: Florian Weimer <fweimer(a)redhat.com>
Date: Tue Apr 2 14:25:44 2013 +0200
Remove Subversion metadata
These files were committed accidentally.
---
defensive-coding/docbook-schema/.svn/all-wcprops | 47 -
defensive-coding/docbook-schema/.svn/entries | 266 -
.../docbook-schema/.svn/text-base/README.svn-base | 3 -
.../.svn/text-base/calstblx.rnc.svn-base | 164 -
.../.svn/text-base/dbhierx.rnc.svn-base | 1549 ------
.../.svn/text-base/dbnotnx.rnc.svn-base | 85 -
.../.svn/text-base/dbpoolx.rnc.svn-base | 5785 --------------------
.../.svn/text-base/docbook.rnc.svn-base | 499 --
.../.svn/text-base/htmltblx.rnc.svn-base | 225 -
defensive-coding/en-US/.svn/all-wcprops | 23 -
defensive-coding/en-US/.svn/entries | 145 -
.../en-US/.svn/prop-base/Book_Info.xml.svn-base | 5 -
.../.svn/prop-base/Defensive_Coding.xml.svn-base | 5 -
.../en-US/.svn/text-base/Book_Info.xml.svn-base | 29 -
.../.svn/text-base/Defensive_Coding.ent.svn-base | 2 -
.../.svn/text-base/Defensive_Coding.xml.svn-base | 26 -
defensive-coding/en-US/C/.svn/all-wcprops | 35 -
defensive-coding/en-US/C/.svn/dir-prop-base | 6 -
defensive-coding/en-US/C/.svn/entries | 198 -
.../en-US/C/.svn/prop-base/Allocators.xml.svn-base | 5 -
.../en-US/C/.svn/prop-base/C.xml.svn-base | 5 -
.../en-US/C/.svn/prop-base/Language.xml.svn-base | 5 -
.../en-US/C/.svn/prop-base/Libc.xml.svn-base | 5 -
.../en-US/C/.svn/prop-base/schemas.xml.svn-base | 5 -
.../en-US/C/.svn/text-base/Allocators.xml.svn-base | 207 -
.../en-US/C/.svn/text-base/C.xml.svn-base | 11 -
.../en-US/C/.svn/text-base/Language.xml.svn-base | 150 -
.../en-US/C/.svn/text-base/Libc.xml.svn-base | 227 -
.../en-US/C/.svn/text-base/schemas.xml.svn-base | 4 -
defensive-coding/en-US/CXX/.svn/all-wcprops | 29 -
defensive-coding/en-US/CXX/.svn/dir-prop-base | 6 -
defensive-coding/en-US/CXX/.svn/entries | 164 -
.../en-US/CXX/.svn/prop-base/CXX.xml.svn-base | 5 -
.../en-US/CXX/.svn/prop-base/Language.xml.svn-base | 5 -
.../en-US/CXX/.svn/prop-base/Std.xml.svn-base | 5 -
.../en-US/CXX/.svn/prop-base/schemas.xml.svn-base | 5 -
.../en-US/CXX/.svn/text-base/CXX.xml.svn-base | 10 -
.../en-US/CXX/.svn/text-base/Language.xml.svn-base | 186 -
.../en-US/CXX/.svn/text-base/Std.xml.svn-base | 32 -
.../en-US/CXX/.svn/text-base/schemas.xml.svn-base | 4 -
defensive-coding/en-US/Features/.svn/all-wcprops | 23 -
defensive-coding/en-US/Features/.svn/dir-prop-base | 6 -
defensive-coding/en-US/Features/.svn/entries | 130 -
.../.svn/prop-base/Authentication.xml.svn-base | 5 -
.../en-US/Features/.svn/prop-base/TLS.xml.svn-base | 5 -
.../Features/.svn/prop-base/schemas.xml.svn-base | 5 -
.../.svn/text-base/Authentication.xml.svn-base | 189 -
.../en-US/Features/.svn/text-base/TLS.xml.svn-base | 988 ----
.../Features/.svn/text-base/schemas.xml.svn-base | 4 -
defensive-coding/en-US/Python/.svn/all-wcprops | 17 -
defensive-coding/en-US/Python/.svn/dir-prop-base | 6 -
defensive-coding/en-US/Python/.svn/entries | 96 -
.../Python/.svn/prop-base/Language.xml.svn-base | 5 -
.../Python/.svn/prop-base/schemas.xml.svn-base | 5 -
.../Python/.svn/text-base/Language.xml.svn-base | 74 -
.../Python/.svn/text-base/schemas.xml.svn-base | 4 -
defensive-coding/en-US/Tasks/.svn/all-wcprops | 59 -
defensive-coding/en-US/Tasks/.svn/dir-prop-base | 6 -
defensive-coding/en-US/Tasks/.svn/entries | 334 --
.../Tasks/.svn/prop-base/Cryptography.xml.svn-base | 5 -
.../Tasks/.svn/prop-base/Descriptors.xml.svn-base | 5 -
.../Tasks/.svn/prop-base/File_System.xml.svn-base | 5 -
.../.svn/prop-base/Library_Design.xml.svn-base | 5 -
.../Tasks/.svn/prop-base/Locking.xml.svn-base | 5 -
.../Tasks/.svn/prop-base/Processes.xml.svn-base | 5 -
.../.svn/prop-base/Serialization.xml.svn-base | 5 -
.../.svn/prop-base/Temporary_Files.xml.svn-base | 5 -
.../Tasks/.svn/prop-base/schemas.xml.svn-base | 5 -
.../Tasks/.svn/text-base/Cryptography.xml.svn-base | 111 -
.../Tasks/.svn/text-base/Descriptors.xml.svn-base | 266 -
.../Tasks/.svn/text-base/File_System.xml.svn-base | 339 --
.../.svn/text-base/Library_Design.xml.svn-base | 195 -
.../Tasks/.svn/text-base/Locking.xml.svn-base | 5 -
.../Tasks/.svn/text-base/Processes.xml.svn-base | 483 --
.../.svn/text-base/Serialization.xml.svn-base | 397 --
.../.svn/text-base/Temporary_Files.xml.svn-base | 257 -
.../Tasks/.svn/text-base/schemas.xml.svn-base | 4 -
defensive-coding/scripts/.svn/all-wcprops | 11 -
defensive-coding/scripts/.svn/entries | 62 -
.../.svn/text-base/split-snippets.py.svn-base | 106 -
defensive-coding/src/.svn/all-wcprops | 107 -
defensive-coding/src/.svn/dir-prop-base | 11 -
defensive-coding/src/.svn/entries | 609 ---
.../src/.svn/text-base/C-Arithmetic-add.c.svn-base | 17 -
.../.svn/text-base/C-Arithmetic-mult.c.svn-base | 12 -
.../.svn/text-base/C-Pointers-remaining.c.svn-base | 51 -
.../.svn/text-base/C-String-Functions.c.svn-base | 49 -
.../src/.svn/text-base/DERParser.java.svn-base | 274 -
.../.svn/text-base/TLS-Client-GNUTLS.c.svn-base | 279 -
.../src/.svn/text-base/TLS-Client-NSS.c.svn-base | 297 -
.../.svn/text-base/TLS-Client-OpenSSL.c.svn-base | 329 --
.../.svn/text-base/TLS-Client-Python.py.svn-base | 56 -
.../.svn/text-base/TLSClientOpenJDK.java.svn-base | 262 -
.../src/.svn/text-base/XML-Parser-Expat.c.svn-base | 135 -
.../.svn/text-base/XMLParserOpenJDK.java.svn-base | 286 -
.../src/.svn/text-base/check-function.py.svn-base | 18 -
.../src/.svn/text-base/src.mk.svn-base | 53 -
.../src/.svn/text-base/tcp_connect.c.svn-base | 52 -
.../src/.svn/text-base/tcp_connect.h.svn-base | 6 -
.../src/.svn/text-base/x509_check_host.c.svn-base | 355 --
defensive-coding/src/data/.svn/all-wcprops | 197 -
defensive-coding/src/data/.svn/entries | 1116 ----
.../prop-base/XML-Parser-DTD_Public.xml.svn-base | 5 -
.../XML-Parser-DTD_Public_URL.xml.svn-base | 5 -
.../prop-base/XML-Parser-DTD_System.xml.svn-base | 5 -
.../XML-Parser-DTD_System_URL.xml.svn-base | 5 -
.../XML-Parser-External_Entity_Public.xml.svn-base | 5 -
...-Parser-External_Entity_Public_URL.xml.svn-base | 5 -
.../XML-Parser-External_Entity_System.xml.svn-base | 5 -
...-Parser-External_Entity_System_URL.xml.svn-base | 5 -
.../XML-Parser-External_Regexp_3.xml.svn-base | 5 -
...Parser-Internal_Entity_Exponential.xml.svn-base | 5 -
...ernal_Entity_Exponential_Attribute.xml.svn-base | 5 -
...-Parser-Internal_Entity_Polynomial.xml.svn-base | 5 -
...ternal_Entity_Polynomial_Attribute.xml.svn-base | 5 -
.../XML-Parser-Internal_Regexp_1.xml.svn-base | 5 -
.../XML-Parser-Internal_Regexp_2.xml.svn-base | 5 -
.../XML-Parser-Internal_Regexp_3.xml.svn-base | 5 -
.../XML-Parser-Notation_Public.xml.svn-base | 5 -
.../XML-Parser-Notation_Public_URL.xml.svn-base | 5 -
.../XML-Parser-Notation_System.xml.svn-base | 5 -
.../XML-Parser-Notation_System_URL.xml.svn-base | 5 -
.../XML-Parser-Validate-Regexp_1.rng.svn-base | 5 -
.../XML-Parser-Validate-Regexp_1.xml.svn-base | 5 -
.../XML-Parser-Validate-Regexp_1.xsd.svn-base | 5 -
.../XML-Parser-Validate-Regexp_4.xsd.svn-base | 5 -
.../XML-Parser-XInclude-File.xml.svn-base | 5 -
.../prop-base/XML-Parser-XInclude-URL.xml.svn-base | 5 -
.../prop-base/XML-Parser-XSD-File.xml.svn-base | 5 -
.../XML-Parser-XSD-Include_File.xml.svn-base | 5 -
.../XML-Parser-XSD-Include_URL.xml.svn-base | 5 -
.../.svn/prop-base/XML-Parser-XSD-URL.xml.svn-base | 5 -
.../text-base/XML-Parser-DTD_Public.xml.svn-base | 4 -
.../XML-Parser-DTD_Public_URL.xml.svn-base | 4 -
.../text-base/XML-Parser-DTD_System.xml.svn-base | 4 -
.../XML-Parser-DTD_System_URL.xml.svn-base | 4 -
.../XML-Parser-External_Entity_Public.xml.svn-base | 7 -
...-Parser-External_Entity_Public_URL.xml.svn-base | 7 -
.../XML-Parser-External_Entity_System.xml.svn-base | 7 -
...-Parser-External_Entity_System_URL.xml.svn-base | 7 -
.../XML-Parser-External_Regexp_3.dtd.svn-base | 11 -
.../XML-Parser-External_Regexp_3.xml.svn-base | 10 -
...Parser-Internal_Entity_Exponential.xml.svn-base | 37 -
...ernal_Entity_Exponential_Attribute.xml.svn-base | 38 -
...-Parser-Internal_Entity_Polynomial.xml.svn-base | 13 -
...ternal_Entity_Polynomial_Attribute.xml.svn-base | 15 -
.../XML-Parser-Internal_Regexp_1.xml.svn-base | 41 -
.../XML-Parser-Internal_Regexp_2.xml.svn-base | 43 -
.../XML-Parser-Internal_Regexp_3.xml.svn-base | 22 -
.../XML-Parser-Notation_Public.xml.svn-base | 8 -
.../XML-Parser-Notation_Public_URL.xml.svn-base | 8 -
.../XML-Parser-Notation_System.xml.svn-base | 8 -
.../XML-Parser-Notation_System_URL.xml.svn-base | 8 -
.../XML-Parser-Validate-Regexp_1.dtd.svn-base | 28 -
.../XML-Parser-Validate-Regexp_1.rng.svn-base | 1010 ----
.../XML-Parser-Validate-Regexp_1.xml.svn-base | 5 -
.../XML-Parser-Validate-Regexp_1.xsd.svn-base | 990 ----
.../XML-Parser-Validate-Regexp_4.xsd.svn-base | 38 -
.../XML-Parser-XInclude-File.xml.svn-base | 5 -
.../text-base/XML-Parser-XInclude-URL.xml.svn-base | 5 -
.../text-base/XML-Parser-XSD-File.xml.svn-base | 4 -
.../XML-Parser-XSD-Include_File.xml.svn-base | 19 -
.../XML-Parser-XSD-Include_URL.xml.svn-base | 19 -
.../.svn/text-base/XML-Parser-XSD-URL.xml.svn-base | 4 -
164 files changed, 21568 deletions(-)
diff --git a/defensive-coding/docbook-schema/.svn/all-wcprops
b/defensive-coding/docbook-schema/.svn/all-wcprops
deleted file mode 100644
index bcae1ee..0000000
--- a/defensive-coding/docbook-schema/.svn/all-wcprops
+++ /dev/null
@@ -1,47 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 74
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema
-END
-htmltblx.rnc
-K 25
-svn:wc:ra_dav:version-url
-V 87
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema/htmltblx.rnc
-END
-docbook.rnc
-K 25
-svn:wc:ra_dav:version-url
-V 86
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema/docbook.rnc
-END
-dbhierx.rnc
-K 25
-svn:wc:ra_dav:version-url
-V 86
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema/dbhierx.rnc
-END
-dbpoolx.rnc
-K 25
-svn:wc:ra_dav:version-url
-V 86
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema/dbpoolx.rnc
-END
-README
-K 25
-svn:wc:ra_dav:version-url
-V 81
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema/README
-END
-calstblx.rnc
-K 25
-svn:wc:ra_dav:version-url
-V 87
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema/calstblx.rnc
-END
-dbnotnx.rnc
-K 25
-svn:wc:ra_dav:version-url
-V 86
-/repos/product-security/!svn/ver/291/defensive-coding/trunk/docbook-schema/dbnotnx.rnc
-END
diff --git a/defensive-coding/docbook-schema/.svn/entries
b/defensive-coding/docbook-schema/.svn/entries
deleted file mode 100644
index 4c68c74..0000000
--- a/defensive-coding/docbook-schema/.svn/entries
+++ /dev/null
@@ -1,266 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/docbook-schema
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-htmltblx.rnc
-file
-
-
-
-
-2013-01-10T17:17:56.371857Z
-21e841469e23f4a9b92aeb9a459d8b53
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-7626
-
-docbook.rnc
-file
-
-
-
-
-2013-01-10T17:17:56.371857Z
-d61460c3a0f4539fe94f63a6caf75ca0
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9150
-
-dbhierx.rnc
-file
-
-
-
-
-2013-01-10T17:17:56.372857Z
-31ef633724ef8f8f23159fefdd55a226
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-43061
-
-dbpoolx.rnc
-file
-
-
-
-
-2013-01-10T17:17:56.372857Z
-ac617851f210fca2d4e1ef9340383bae
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-167400
-
-README
-file
-
-
-
-
-2013-01-10T17:17:56.372857Z
-6aa0b595c5fce9b9bb2d35cceac7411f
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-154
-
-calstblx.rnc
-file
-
-
-
-
-2013-01-10T17:17:56.372857Z
-3477bdcf199a10c15051d27b2b6e2d89
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-6329
-
-dbnotnx.rnc
-file
-
-
-
-
-2013-01-10T17:17:56.372857Z
-8bf718c756c864dcb6c90fc81f537c50
-2012-12-14T10:14:43.664315Z
-291
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2588
-
diff --git a/defensive-coding/docbook-schema/.svn/text-base/README.svn-base
b/defensive-coding/docbook-schema/.svn/text-base/README.svn-base
deleted file mode 100644
index c636682..0000000
--- a/defensive-coding/docbook-schema/.svn/text-base/README.svn-base
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains Relax NG Compact schema files, for use with
-Emacs. These files were download from
http://www.docbook.org/rng/4.5/
-on 2012-07-16.
diff --git a/defensive-coding/docbook-schema/.svn/text-base/calstblx.rnc.svn-base
b/defensive-coding/docbook-schema/.svn/text-base/calstblx.rnc.svn-base
deleted file mode 100644
index b6a2483..0000000
--- a/defensive-coding/docbook-schema/.svn/text-base/calstblx.rnc.svn-base
+++ /dev/null
@@ -1,164 +0,0 @@
-# ......................................................................
-
-# DocBook CALS Table Model V4.5 ........................................
-
-# File calstblx.mod ....................................................
-
-# Copyright 1992-2002 HaL Computer Systems, Inc.,
-# O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
-# Corporation, Norman Walsh, Sun Microsystems, Inc., and the
-# Organization for the Advancement of Structured Information
-# Standards (OASIS).
-#
-# This DTD is based on the CALS Table Model
-# PUBLIC "-//USA-DOD//DTD Table Model 951010//EN"
-#
-# $Id: calstblx.dtd 6340 2006-10-03 13:23:24Z nwalsh $
-#
-# Permission to use, copy, modify and distribute the DocBook DTD
-# and its accompanying documentation for any purpose and without fee
-# is hereby granted in perpetuity, provided that the above copyright
-# notice and this paragraph appear in all copies. The copyright
-# holders make no representation about the suitability of the DTD for
-# any purpose. It is provided "as is" without expressed or implied
-# warranty.
-#
-# If you modify the DocBook DTD in any way, except for declaring and
-# referencing additional sets of general entities and declaring
-# additional notations, label your DTD as a variant of DocBook. See
-# the maintenance documentation for more information.
-#
-# Please direct all questions, bug reports, or suggestions for
-# changes to the docbook(a)lists.oasis-open.org mailing list. For more
-# information, see
http://www.oasis-open.org/docbook/.
-
-# ......................................................................
-
-# This module contains the definitions for the CALS Table Model
-# converted to XML. It has been modified slightly for use in the
-# combined HTML/CALS models supported by DocBook V4.5.
-
-# These definitions are not directly related to the table model, but are
-# used in the default CALS table model and are usually defined elsewhere
-# (and prior to the inclusion of this table module) in a CALS DTD.
-
-# no if zero(s),
-# yes if any other digits value
-
-yesorno = string
-titles = title?
-# default for use in entry content
-
-# The parameter entities as defined below provide the CALS table model
-# as published (as part of the Example DTD) in MIL-HDBK-28001.
-#
-# These following declarations provide the CALS-compliant default definitions
-# for these entities. However, these entities can and should be redefined
-# (by giving the appropriate parameter entity declaration(s) prior to the
-# reference to this Table Model declaration set entity) to fit the needs
-# of the current application.
-tbl.table-titles.mdl = titles
-tbl.table-main.mdl = tgroup+ | graphic+
-tbl.tgroup.mdl = colspec*, spanspec*, thead?, tfoot?, tbody
-tbl.tgroup.att = attribute tgroupstyle { text }?
-tbl.row.mdl = (entry | entrytbl)+
-tbl.entrytbl.mdl = colspec*, spanspec*, thead?, tbody
-# ===== Element and attribute declarations follow. =====
-
-# doc:A formal table in a document.
-table = element table { table.attlist, tbl.table.mdl }
-table.attlist &=
- attribute frame { tbl.frame.attval }?,
- attribute colsep { yesorno }?,
- attribute rowsep { yesorno }?,
- tbl.table.att,
- bodyatt,
- secur
-# doc:A wrapper for the main content of a table, or part of a table.
-tgroup = element tgroup { tgroup.attlist, tbl.tgroup.mdl }
-tgroup.attlist &=
- attribute cols { text },
- tbl.tgroup.att,
- attribute colsep { yesorno }?,
- attribute rowsep { yesorno }?,
- attribute align { "left" | "right" | "center" |
"justify" | "char" }?,
- attribute char { text }?,
- attribute charoff { text }?,
- secur
-# doc:Specifications for a column in a table.
-colspec = element colspec { colspec.attlist, empty }
-colspec.attlist &=
- attribute colnum { text }?,
- attribute colname { text }?,
- attribute colwidth { text }?,
- attribute colsep { yesorno }?,
- attribute rowsep { yesorno }?,
- attribute align { "left" | "right" | "center" |
"justify" | "char" }?,
- attribute char { text }?,
- attribute charoff { text }?
-# doc:Formatting information for a spanned column in a table.
-spanspec = element spanspec { spanspec.attlist, empty }
-spanspec.attlist &=
- attribute namest { text },
- attribute nameend { text },
- attribute spanname { text },
- attribute colsep { yesorno }?,
- attribute rowsep { yesorno }?,
- attribute align { "left" | "right" | "center" |
"justify" | "char" }?,
- attribute char { text }?,
- attribute charoff { text }?
-# doc:A table header consisting of one or more rows.
-thead = element thead { thead.attlist, tbl.hdft.mdl }
-thead.attlist &=
- attribute valign { "top" | "middle" | "bottom" }?,
- secur
-# doc:A table footer consisting of one or more rows.
-tfoot = element tfoot { tfoot.attlist, tbl.hdft.mdl }
-tfoot.attlist &=
- attribute valign { "top" | "middle" | "bottom" }?,
- secur
-# doc:A wrapper for the rows of a table or informal table.
-tbody = element tbody { tbody.attlist, tbl.tbody.mdl }
-tbody.attlist &=
- attribute valign { "top" | "middle" | "bottom" }?,
- secur
-# doc:A row in a table.
-row = element row { row.attlist, tbl.row.mdl }
-row.attlist &=
- attribute rowsep { yesorno }?,
- attribute valign { "top" | "middle" | "bottom" }?,
- secur
-# doc:A subtable appearing in place of an Entry in a table.
-entrytbl = element entrytbl { entrytbl.attlist, tbl.entrytbl.mdl }
-entrytbl.attlist &=
- attribute cols { text },
- tbl.tgroup.att,
- attribute colname { text }?,
- attribute spanname { text }?,
- attribute namest { text }?,
- attribute nameend { text }?,
- attribute colsep { yesorno }?,
- attribute rowsep { yesorno }?,
- attribute align { "left" | "right" | "center" |
"justify" | "char" }?,
- attribute char { text }?,
- attribute charoff { text }?,
- secur
-# doc:A cell in a table.
-entry = element entry { entry.attlist, tbl.entry.mdl* }
-entry.attlist &=
- attribute colname { text }?,
- attribute namest { text }?,
- attribute nameend { text }?,
- attribute spanname { text }?,
- attribute morerows { text }?,
- attribute colsep { yesorno }?,
- attribute rowsep { yesorno }?,
- attribute align { "left" | "right" | "center" |
"justify" | "char" }?,
- attribute char { text }?,
- attribute charoff { text }?,
- attribute rotate { yesorno }?,
- attribute valign { "top" | "middle" | "bottom" }?,
- secur
-# End of DocBook CALS Table Model V4.5 .................................
-
-# ......................................................................
diff --git a/defensive-coding/docbook-schema/.svn/text-base/dbhierx.rnc.svn-base
b/defensive-coding/docbook-schema/.svn/text-base/dbhierx.rnc.svn-base
deleted file mode 100644
index 56015a3..0000000
--- a/defensive-coding/docbook-schema/.svn/text-base/dbhierx.rnc.svn-base
+++ /dev/null
@@ -1,1549 +0,0 @@
-# ......................................................................
-
-# DocBook document hierarchy module V4.5 ...............................
-
-# File dbhierx.mod .....................................................
-
-# Copyright 1992-2004 HaL Computer Systems, Inc.,
-# O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
-# Corporation, Norman Walsh, Sun Microsystems, Inc., and the
-# Organization for the Advancement of Structured Information
-# Standards (OASIS).
-#
-# $Id: dbhierx.mod 6340 2006-10-03 13:23:24Z nwalsh $
-#
-# Permission to use, copy, modify and distribute the DocBook DTD
-# and its accompanying documentation for any purpose and without fee
-# is hereby granted in perpetuity, provided that the above copyright
-# notice and this paragraph appear in all copies. The copyright
-# holders make no representation about the suitability of the DTD for
-# any purpose. It is provided "as is" without expressed or implied
-# warranty.
-#
-# If you modify the DocBook DTD in any way, except for declaring and
-# referencing additional sets of general entities and declaring
-# additional notations, label your DTD as a variant of DocBook. See
-# the maintenance documentation for more information.
-#
-# Please direct all questions, bug reports, or suggestions for
-# changes to the docbook(a)lists.oasis-open.org mailing list. For more
-# information, see
http://www.oasis-open.org/docbook/.
-
-# ......................................................................
-
-# This module contains the definitions for the overall document
-# hierarchies of DocBook documents. It covers computer documentation
-# manuals and manual fragments, as well as reference entries (such as
-# man pages) and technical journals or anthologies containing
-# articles.
-#
-# This module depends on the DocBook information pool module. All
-# elements and entities referenced but not defined here are assumed
-# to be defined in the information pool module.
-#
-# In DTD driver files referring to this module, please use an entity
-# declaration that uses the public identifier shown below:
-#
-# <!ENTITY % dbhier PUBLIC
-# "-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN"
-# "dbhierx.mod">
-# %dbhier;
-#
-# See the documentation for detailed information on the parameter
-# entity and module scheme used in DocBook, customizing DocBook and
-# planning for interchange, and changes made since the last release
-# of DocBook.
-
-# ......................................................................
-
-# Entities for module inclusions .......................................
-
-# ......................................................................
-
-# Entities for element classes .........................................
-
-local.appendix.class = notAllowed
-appendix.class = appendix | local.appendix.class
-local.article.class = notAllowed
-article.class = article | local.article.class
-local.book.class = notAllowed
-book.class = book | local.book.class
-local.chapter.class = notAllowed
-chapter.class = chapter | local.chapter.class
-local.index.class = notAllowed
-index.class = index | setindex | local.index.class
-local.refentry.class = notAllowed
-refentry.class = refentry | local.refentry.class
-local.section.class = notAllowed
-section.class = section | local.section.class
-local.nav.class = notAllowed
-nav.class =
- toc | lot | index | glossary | bibliography | local.nav.class
-# Redeclaration placeholder ............................................
-
-# For redeclaring entities that are declared after this point while
-# retaining their references to the entities that are declared before
-# this point
-
-# ......................................................................
-
-# Entities for element mixtures ........................................
-local.divcomponent.mix = notAllowed
-divcomponent.mix =
- list.class
- | admon.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | compound.class
- | genobj.class
- | descobj.class
- | ndxterm.class
- | beginpage
- | forms.hook
- | local.divcomponent.mix
-local.refcomponent.mix = notAllowed
-refcomponent.mix =
- list.class
- | admon.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | compound.class
- | genobj.class
- | descobj.class
- | ndxterm.class
- | beginpage
- | forms.hook
- | local.refcomponent.mix
-local.indexdivcomponent.mix = notAllowed
-indexdivcomponent.mix =
- itemizedlist
- | orderedlist
- | variablelist
- | simplelist
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | anchor
- | remark
- | link.char.class
- | beginpage
- | local.indexdivcomponent.mix
-local.refname.char.mix = notAllowed
-refname.char.mix = text | tech.char.class | local.refname.char.mix
-local.partcontent.mix = notAllowed
-partcontent.mix =
- appendix.class
- | chapter.class
- | nav.class
- | article.class
- | preface
- | refentry.class
- | reference
- | local.partcontent.mix
-local.refinline.char.mix = notAllowed
-refinline.char.mix =
- text
- | xref.char.class
- | gen.char.class
- | link.char.class
- | tech.char.class
- | base.char.class
- | docinfo.char.class
- | other.char.class
- | ndxterm.class
- | beginpage
- | local.refinline.char.mix
-local.refclass.char.mix = notAllowed
-refclass.char.mix = text | application | local.refclass.char.mix
-# Redeclaration placeholder 2 ..........................................
-
-# For redeclaring entities that are declared after this point while
-# retaining their references to the entities that are declared before
-# this point
-
-# ......................................................................
-
-# Entities for content models ..........................................
-div.title.content = title, subtitle?, titleabbrev?
-bookcomponent.title.content = title, subtitle?, titleabbrev?
-sect.title.content = title, subtitle?, titleabbrev?
-refsect.title.content = title, subtitle?, titleabbrev?
-bookcomponent.content =
- (divcomponent.mix+,
- (sect1* | refentry.class* | simplesect* | section.class*))
- | (sect1+ | refentry.class+ | simplesect+ | section.class+)
-# ......................................................................
-
-# Set and SetInfo ......................................................
-local.set.attrib = empty
-set.role.attrib = role.attrib
-# doc:A collection of books.
-set =
- element set {
- set.attlist,
- div.title.content?,
- setinfo?,
- toc?,
- (set | book.class)+,
- setindex?
- }
-# end of set.element
-
-# FPI: SGML formal public identifier
-set.attlist &=
- attribute fpi { text }?,
- status.attrib,
- common.attrib,
- set.role.attrib,
- local.set.attrib
-# end of set.attlist
-
-# end of set.module
-local.setinfo.attrib = empty
-setinfo.role.attrib = role.attrib
-# doc:Meta-information for a Set.
-setinfo = element setinfo { setinfo.attlist, info.class+ }
-# end of setinfo.element
-
-# Contents: IDs of the ToC, Books, and SetIndex that comprise
-# the set, in the order of their appearance
-setinfo.attlist &=
- attribute contents { xsd:IDREFS }?,
- common.attrib,
- setinfo.role.attrib,
- local.setinfo.attrib
-# end of setinfo.attlist
-
-# end of setinfo.module
-
-# end of set.content.module
-
-# ......................................................................
-
-# Book and BookInfo ....................................................
-local.book.attrib = empty
-book.role.attrib = role.attrib
-# doc:A book.
-book =
- element book {
- book.attlist,
- div.title.content?,
- bookinfo?,
- (dedication
- | toc
- | lot
- | glossary
- | bibliography
- | preface
- | chapter.class
- | reference
- | part
- | article.class
- | appendix.class
- | index.class
- | colophon)*
- }
-# end of book.element
-
-# FPI: SGML formal public identifier
-book.attlist &=
- attribute fpi { text }?,
- label.attrib,
- status.attrib,
- common.attrib,
- book.role.attrib,
- local.book.attrib
-# end of book.attlist
-
-# end of book.module
-local.bookinfo.attrib = empty
-bookinfo.role.attrib = role.attrib
-# doc:Meta-information for a Book.
-bookinfo = element bookinfo { bookinfo.attlist, info.class+ }
-# end of bookinfo.element
-
-# Contents: IDs of the ToC, LoTs, Prefaces, Parts, Chapters,
-# Appendixes, References, GLossary, Bibliography, and indexes
-# comprising the Book, in the order of their appearance
-bookinfo.attlist &=
- attribute contents { xsd:IDREFS }?,
- common.attrib,
- bookinfo.role.attrib,
- local.bookinfo.attrib
-# end of bookinfo.attlist
-
-# end of bookinfo.module
-
-# end of book.content.module
-
-# ......................................................................
-
-# Dedication, ToC, and LoT .............................................
-local.dedication.attrib = empty
-dedication.role.attrib = role.attrib
-# doc:A wrapper for the dedication section of a book.
-dedication =
- element dedication {
- dedication.attlist, sect.title.content?, legalnotice.mix+
- }
-# end of dedication.element
-dedication.attlist &=
- status.attrib,
- common.attrib,
- dedication.role.attrib,
- local.dedication.attrib
-# end of dedication.attlist
-
-# end of dedication.module
-local.colophon.attrib = empty
-colophon.role.attrib = role.attrib
-# doc:Text at the back of a book describing facts about its production.
-colophon =
- element colophon {
- colophon.attlist, sect.title.content?, textobject.mix+
- }
-# end of colophon.element
-colophon.attlist &=
- status.attrib,
- common.attrib,
- colophon.role.attrib,
- local.colophon.attrib
-# end of colophon.attlist
-
-# end of colophon.module
-local.toc.attrib = empty
-toc.role.attrib = role.attrib
-# doc:A table of contents.
-toc =
- element toc {
- toc.attlist,
- beginpage?,
- bookcomponent.title.content?,
- tocfront*,
- (tocpart | tocchap)*,
- tocback*
- }
-# end of toc.element
-toc.attlist &=
- pagenum.attrib, common.attrib, toc.role.attrib, local.toc.attrib
-# end of toc.attlist
-
-# end of toc.module
-local.tocfront.attrib = empty
-tocfront.role.attrib = role.attrib
-# doc:An entry in a table of contents for a front matter component.
-tocfront = element tocfront { tocfront.attlist, para.char.mix* }
-# end of tocfront.element
-
-# to element that this entry represents
-tocfront.attlist &=
- label.attrib,
- linkend.attrib,
- pagenum.attrib,
- common.attrib,
- tocfront.role.attrib,
- local.tocfront.attrib
-# end of tocfront.attlist
-
-# end of tocfront.module
-local.tocentry.attrib = empty
-tocentry.role.attrib = role.attrib
-# doc:A component title in a table of contents.
-tocentry = element tocentry { tocentry.attlist, para.char.mix* }
-# end of tocentry.element
-
-# to element that this entry represents
-tocentry.attlist &=
- linkend.attrib,
- pagenum.attrib,
- common.attrib,
- tocentry.role.attrib,
- local.tocentry.attrib
-# end of tocentry.attlist
-
-# end of tocentry.module
-local.tocpart.attrib = empty
-tocpart.role.attrib = role.attrib
-# doc:An entry in a table of contents for a part of a book.
-tocpart = element tocpart { tocpart.attlist, tocentry+, tocchap* }
-# end of tocpart.element
-tocpart.attlist &=
- common.attrib, tocpart.role.attrib, local.tocpart.attrib
-# end of tocpart.attlist
-
-# end of tocpart.module
-local.tocchap.attrib = empty
-tocchap.role.attrib = role.attrib
-# doc:An entry in a table of contents for a component in the body of a document.
-tocchap = element tocchap { tocchap.attlist, tocentry+, toclevel1* }
-# end of tocchap.element
-tocchap.attlist &=
- label.attrib, common.attrib, tocchap.role.attrib, local.tocchap.attrib
-# end of tocchap.attlist
-
-# end of tocchap.module
-local.toclevel1.attrib = empty
-toclevel1.role.attrib = role.attrib
-# doc:A top-level entry within a table of contents entry for a chapter-like component.
-toclevel1 =
- element toclevel1 { toclevel1.attlist, tocentry+, toclevel2* }
-# end of toclevel1.element
-toclevel1.attlist &=
- common.attrib, toclevel1.role.attrib, local.toclevel1.attrib
-# end of toclevel1.attlist
-
-# end of toclevel1.module
-local.toclevel2.attrib = empty
-toclevel2.role.attrib = role.attrib
-# doc:A second-level entry within a table of contents entry for a chapter-like
component.
-toclevel2 =
- element toclevel2 { toclevel2.attlist, tocentry+, toclevel3* }
-# end of toclevel2.element
-toclevel2.attlist &=
- common.attrib, toclevel2.role.attrib, local.toclevel2.attrib
-# end of toclevel2.attlist
-
-# end of toclevel2.module
-local.toclevel3.attrib = empty
-toclevel3.role.attrib = role.attrib
-# doc:A third-level entry within a table of contents entry for a chapter-like component.
-toclevel3 =
- element toclevel3 { toclevel3.attlist, tocentry+, toclevel4* }
-# end of toclevel3.element
-toclevel3.attlist &=
- common.attrib, toclevel3.role.attrib, local.toclevel3.attrib
-# end of toclevel3.attlist
-
-# end of toclevel3.module
-local.toclevel4.attrib = empty
-toclevel4.role.attrib = role.attrib
-# doc:A fourth-level entry within a table of contents entry for a chapter-like
component.
-toclevel4 =
- element toclevel4 { toclevel4.attlist, tocentry+, toclevel5* }
-# end of toclevel4.element
-toclevel4.attlist &=
- common.attrib, toclevel4.role.attrib, local.toclevel4.attrib
-# end of toclevel4.attlist
-
-# end of toclevel4.module
-local.toclevel5.attrib = empty
-toclevel5.role.attrib = role.attrib
-# doc:A fifth-level entry within a table of contents entry for a chapter-like component.
-toclevel5 = element toclevel5 { toclevel5.attlist, tocentry+ }
-# end of toclevel5.element
-toclevel5.attlist &=
- common.attrib, toclevel5.role.attrib, local.toclevel5.attrib
-# end of toclevel5.attlist
-
-# end of toclevel5.module
-local.tocback.attrib = empty
-tocback.role.attrib = role.attrib
-# doc:An entry in a table of contents for a back matter component.
-tocback = element tocback { tocback.attlist, para.char.mix* }
-# end of tocback.element
-
-# to element that this entry represents
-tocback.attlist &=
- label.attrib,
- linkend.attrib,
- pagenum.attrib,
- common.attrib,
- tocback.role.attrib,
- local.tocback.attrib
-# end of tocback.attlist
-
-# end of tocback.module
-
-# end of toc.content.module
-local.lot.attrib = empty
-lot.role.attrib = role.attrib
-# doc:A list of the titles of formal objects (as tables or figures) in a document.
-lot =
- element lot {
- lot.attlist, beginpage?, bookcomponent.title.content?, lotentry*
- }
-# end of lot.element
-lot.attlist &=
- label.attrib, common.attrib, lot.role.attrib, local.lot.attrib
-# end of lot.attlist
-
-# end of lot.module
-local.lotentry.attrib = empty
-lotentry.role.attrib = role.attrib
-# doc:An entry in a list of titles.
-lotentry = element lotentry { lotentry.attlist, para.char.mix* }
-# end of lotentry.element
-
-# SrcCredit: Information about the source of the entry,
-# as for a list of illustrations
-
-# linkend: to element that this entry represents
-lotentry.attlist &=
- linkend.attrib,
- pagenum.attrib,
- attribute srccredit { text }?,
- common.attrib,
- lotentry.role.attrib,
- local.lotentry.attrib
-# end of lotentry.attlist
-
-# end of lotentry.module
-
-# end of lot.content.module
-
-# ......................................................................
-
-# Appendix, Chapter, Part, Preface, Reference, PartIntro ...............
-local.appendix.attrib = empty
-appendix.role.attrib = role.attrib
-# doc:An appendix in a Book or Article.
-appendix =
- element appendix {
- appendix.attlist,
- beginpage?,
- appendixinfo?,
- bookcomponent.title.content,
- nav.class*,
- tocchap?,
- bookcomponent.content,
- nav.class*
- }
-# end of appendix.element
-appendix.attlist &=
- label.attrib,
- status.attrib,
- common.attrib,
- appendix.role.attrib,
- local.appendix.attrib
-# end of appendix.attlist
-
-# end of appendix.module
-local.chapter.attrib = empty
-chapter.role.attrib = role.attrib
-# doc:A chapter, as of a book.
-chapter =
- element chapter {
- chapter.attlist,
- beginpage?,
- chapterinfo?,
- bookcomponent.title.content,
- nav.class*,
- tocchap?,
- bookcomponent.content,
- nav.class*
- }
-# end of chapter.element
-chapter.attlist &=
- label.attrib,
- status.attrib,
- common.attrib,
- chapter.role.attrib,
- local.chapter.attrib
-# end of chapter.attlist
-
-# end of chapter.module
-
-# Note that Part was to have its content model reduced in V4.5. This
-# change will not be made after all.
-local.part.attrib = empty
-part.role.attrib = role.attrib
-# doc:A division in a book.
-part =
- element part {
- part.attlist,
- beginpage?,
- partinfo?,
- bookcomponent.title.content,
- partintro?,
- partcontent.mix+
- }
-# end of part.element
-part.attlist &=
- label.attrib,
- status.attrib,
- common.attrib,
- part.role.attrib,
- local.part.attrib
-# end of part.attlist
-
-# ELEMENT PartIntro (defined below)
-
-# end of part.module
-local.preface.attrib = empty
-preface.role.attrib = role.attrib
-# doc:Introductory matter preceding the first chapter of a book.
-preface =
- element preface {
- preface.attlist,
- beginpage?,
- prefaceinfo?,
- bookcomponent.title.content,
- nav.class*,
- tocchap?,
- bookcomponent.content,
- nav.class*
- }
-# end of preface.element
-preface.attlist &=
- status.attrib,
- common.attrib,
- preface.role.attrib,
- local.preface.attrib
-# end of preface.attlist
-
-# end of preface.module
-local.reference.attrib = empty
-reference.role.attrib = role.attrib
-# doc:A collection of reference entries.
-reference =
- element reference {
- reference.attlist,
- beginpage?,
- referenceinfo?,
- bookcomponent.title.content,
- partintro?,
- refentry.class+
- }
-# end of reference.element
-reference.attlist &=
- label.attrib,
- status.attrib,
- common.attrib,
- reference.role.attrib,
- local.reference.attrib
-# end of reference.attlist
-
-# ELEMENT PartIntro (defined below)
-
-# end of reference.module
-local.partintro.attrib = empty
-partintro.role.attrib = role.attrib
-# doc:An introduction to the contents of a part.
-partintro =
- element partintro {
- partintro.attlist, div.title.content?, bookcomponent.content
- }
-# end of partintro.element
-partintro.attlist &=
- label.attrib,
- common.attrib,
- partintro.role.attrib,
- local.partintro.attrib
-# end of partintro.attlist
-
-# end of partintro.module
-
-# ......................................................................
-
-# Other Info elements ..................................................
-local.appendixinfo.attrib = empty
-appendixinfo.role.attrib = role.attrib
-# doc:Meta-information for an Appendix.
-appendixinfo =
- element appendixinfo { appendixinfo.attlist, info.class+ }
-# end of appendixinfo.element
-appendixinfo.attlist &=
- common.attrib, appendixinfo.role.attrib, local.appendixinfo.attrib
-# end of appendixinfo.attlist
-
-# end of appendixinfo.module
-local.bibliographyinfo.attrib = empty
-bibliographyinfo.role.attrib = role.attrib
-# doc:Meta-information for a Bibliography.
-bibliographyinfo =
- element bibliographyinfo { bibliographyinfo.attlist, info.class+ }
-# end of bibliographyinfo.element
-bibliographyinfo.attlist &=
- common.attrib,
- bibliographyinfo.role.attrib,
- local.bibliographyinfo.attrib
-# end of bibliographyinfo.attlist
-
-# end of bibliographyinfo.module
-local.chapterinfo.attrib = empty
-chapterinfo.role.attrib = role.attrib
-# doc:Meta-information for a Chapter.
-chapterinfo = element chapterinfo { chapterinfo.attlist, info.class+ }
-# end of chapterinfo.element
-chapterinfo.attlist &=
- common.attrib, chapterinfo.role.attrib, local.chapterinfo.attrib
-# end of chapterinfo.attlist
-
-# end of chapterinfo.module
-local.glossaryinfo.attrib = empty
-glossaryinfo.role.attrib = role.attrib
-# doc:Meta-information for a Glossary.
-glossaryinfo =
- element glossaryinfo { glossaryinfo.attlist, info.class+ }
-# end of glossaryinfo.element
-glossaryinfo.attlist &=
- common.attrib, glossaryinfo.role.attrib, local.glossaryinfo.attrib
-# end of glossaryinfo.attlist
-
-# end of glossaryinfo.module
-local.indexinfo.attrib = empty
-indexinfo.role.attrib = role.attrib
-# doc:Meta-information for an Index.
-indexinfo = element indexinfo { indexinfo.attlist, info.class+ }
-# end of indexinfo.element
-indexinfo.attlist &=
- common.attrib, indexinfo.role.attrib, local.indexinfo.attrib
-# end of indexinfo.attlist
-
-# end of indexinfo.module
-local.setindexinfo.attrib = empty
-setindexinfo.role.attrib = role.attrib
-# doc:Meta-information for a SetIndex.
-setindexinfo =
- element setindexinfo { setindexinfo.attlist, info.class+ }
-# end of setindexinfo.element
-setindexinfo.attlist &=
- common.attrib, setindexinfo.role.attrib, local.setindexinfo.attrib
-# end of setindexinfo.attlist
-
-# end of setindexinfo.module
-local.partinfo.attrib = empty
-partinfo.role.attrib = role.attrib
-# doc:Meta-information for a Part.
-partinfo = element partinfo { partinfo.attlist, info.class+ }
-# end of partinfo.element
-partinfo.attlist &=
- common.attrib, partinfo.role.attrib, local.partinfo.attrib
-# end of partinfo.attlist
-
-# end of partinfo.module
-local.prefaceinfo.attrib = empty
-prefaceinfo.role.attrib = role.attrib
-# doc:Meta-information for a Preface.
-prefaceinfo = element prefaceinfo { prefaceinfo.attlist, info.class+ }
-# end of prefaceinfo.element
-prefaceinfo.attlist &=
- common.attrib, prefaceinfo.role.attrib, local.prefaceinfo.attrib
-# end of prefaceinfo.attlist
-
-# end of prefaceinfo.module
-local.refentryinfo.attrib = empty
-refentryinfo.role.attrib = role.attrib
-# doc:Meta-information for a Refentry.
-refentryinfo =
- element refentryinfo { refentryinfo.attlist, info.class+ }
-# end of refentryinfo.element
-refentryinfo.attlist &=
- common.attrib, refentryinfo.role.attrib, local.refentryinfo.attrib
-# end of refentryinfo.attlist
-
-# end of refentryinfo.module
-local.refsectioninfo.attrib = empty
-refsectioninfo.role.attrib = role.attrib
-# doc:Meta-information for a refsection.
-refsectioninfo =
- element refsectioninfo { refsectioninfo.attlist, info.class+ }
-# end of refsectioninfo.element
-refsectioninfo.attlist &=
- common.attrib, refsectioninfo.role.attrib, local.refsectioninfo.attrib
-# end of refsectioninfo.attlist
-
-# end of refsectioninfo.module
-local.refsect1info.attrib = empty
-refsect1info.role.attrib = role.attrib
-# doc:Meta-information for a RefSect1.
-refsect1info =
- element refsect1info { refsect1info.attlist, info.class+ }
-# end of refsect1info.element
-refsect1info.attlist &=
- common.attrib, refsect1info.role.attrib, local.refsect1info.attrib
-# end of refsect1info.attlist
-
-# end of refsect1info.module
-local.refsect2info.attrib = empty
-refsect2info.role.attrib = role.attrib
-# doc:Meta-information for a RefSect2.
-refsect2info =
- element refsect2info { refsect2info.attlist, info.class+ }
-# end of refsect2info.element
-refsect2info.attlist &=
- common.attrib, refsect2info.role.attrib, local.refsect2info.attrib
-# end of refsect2info.attlist
-
-# end of refsect2info.module
-local.refsect3info.attrib = empty
-refsect3info.role.attrib = role.attrib
-# doc:Meta-information for a RefSect3.
-refsect3info =
- element refsect3info { refsect3info.attlist, info.class+ }
-# end of refsect3info.element
-refsect3info.attlist &=
- common.attrib, refsect3info.role.attrib, local.refsect3info.attrib
-# end of refsect3info.attlist
-
-# end of refsect3info.module
-local.refsynopsisdivinfo.attrib = empty
-refsynopsisdivinfo.role.attrib = role.attrib
-# doc:Meta-information for a RefSynopsisDiv.
-refsynopsisdivinfo =
- element refsynopsisdivinfo { refsynopsisdivinfo.attlist, info.class+ }
-# end of refsynopsisdivinfo.element
-refsynopsisdivinfo.attlist &=
- common.attrib,
- refsynopsisdivinfo.role.attrib,
- local.refsynopsisdivinfo.attrib
-# end of refsynopsisdivinfo.attlist
-
-# end of refsynopsisdivinfo.module
-local.referenceinfo.attrib = empty
-referenceinfo.role.attrib = role.attrib
-# doc:Meta-information for a Reference.
-referenceinfo =
- element referenceinfo { referenceinfo.attlist, info.class+ }
-# end of referenceinfo.element
-referenceinfo.attlist &=
- common.attrib, referenceinfo.role.attrib, local.referenceinfo.attrib
-# end of referenceinfo.attlist
-
-# end of referenceinfo.module
-local.sect1info.attrib = empty
-sect1info.role.attrib = role.attrib
-# doc:Meta-information for a Sect1.
-sect1info = element sect1info { sect1info.attlist, info.class+ }
-# end of sect1info.element
-sect1info.attlist &=
- common.attrib, sect1info.role.attrib, local.sect1info.attrib
-# end of sect1info.attlist
-local.sect2info.attrib = empty
-sect2info.role.attrib = role.attrib
-# doc:Meta-information for a Sect2.
-sect2info = element sect2info { sect2info.attlist, info.class+ }
-# end of sect2info.element
-sect2info.attlist &=
- common.attrib, sect2info.role.attrib, local.sect2info.attrib
-# end of sect2info.attlist
-local.sect3info.attrib = empty
-sect3info.role.attrib = role.attrib
-# doc:Meta-information for a Sect3.
-sect3info = element sect3info { sect3info.attlist, info.class+ }
-# end of sect3info.element
-sect3info.attlist &=
- common.attrib, sect3info.role.attrib, local.sect3info.attrib
-# end of sect3info.attlist
-local.sect4info.attrib = empty
-sect4info.role.attrib = role.attrib
-# doc:Meta-information for a Sect4.
-sect4info = element sect4info { sect4info.attlist, info.class+ }
-# end of sect4info.element
-sect4info.attlist &=
- common.attrib, sect4info.role.attrib, local.sect4info.attrib
-# end of sect4info.attlist
-local.sect5info.attrib = empty
-sect5info.role.attrib = role.attrib
-# doc:Meta-information for a Sect5.
-sect5info = element sect5info { sect5info.attlist, info.class+ }
-# end of sect5info.element
-sect5info.attlist &=
- common.attrib, sect5info.role.attrib, local.sect5info.attrib
-# end of sect5info.attlist
-
-# ......................................................................
-
-# Section (parallel to Sect*) .........................................
-local.section.attrib = empty
-section.role.attrib = role.attrib
-# doc:A recursive section.
-section =
- element section {
- section.attlist,
- sectioninfo?,
- sect.title.content,
- nav.class*,
- ((divcomponent.mix+,
- (refentry.class* | section.class* | simplesect*))
- | refentry.class+
- | section.class+
- | simplesect+),
- nav.class*
- }
-# end of section.element
-section.attlist &=
- label.attrib,
- status.attrib,
- common.attrib,
- section.role.attrib,
- local.section.attrib
-# end of section.attlist
-
-# end of section.module
-sectioninfo.role.attrib = role.attrib
-local.sectioninfo.attrib = empty
-# doc:Meta-information for a recursive section.
-sectioninfo = element sectioninfo { sectioninfo.attlist, info.class+ }
-# end of sectioninfo.element
-sectioninfo.attlist &=
- common.attrib, sectioninfo.role.attrib, local.sectioninfo.attrib
-# end of sectioninfo.attlist
-
-# end of sectioninfo.module
-
-# end of section.content.module
-
-# ......................................................................
-
-# Sect1, Sect2, Sect3, Sect4, Sect5 ....................................
-local.sect1.attrib = empty
-sect1.role.attrib = role.attrib
-# doc:A top-level section of document.
-sect1 =
- element sect1 {
- sect1.attlist,
- sect1info?,
- sect.title.content,
- nav.class*,
- ((divcomponent.mix+, (refentry.class* | sect2* | simplesect*))
- | refentry.class+
- | sect2+
- | simplesect+),
- nav.class*
- }
-# end of sect1.element
-
-# Renderas: Indicates the format in which the heading should
-# appear
-sect1.attlist &=
- attribute renderas { "sect2" | "sect3" | "sect4" |
"sect5" }?,
- label.attrib,
- status.attrib,
- common.attrib,
- sect1.role.attrib,
- local.sect1.attrib
-# end of sect1.attlist
-
-# end of sect1.module
-local.sect2.attrib = empty
-sect2.role.attrib = role.attrib
-# doc:A subsection within a Sect1.
-sect2 =
- element sect2 {
- sect2.attlist,
- sect2info?,
- sect.title.content,
- nav.class*,
- ((divcomponent.mix+, (refentry.class* | sect3* | simplesect*))
- | refentry.class+
- | sect3+
- | simplesect+),
- nav.class*
- }
-# end of sect2.element
-
-# Renderas: Indicates the format in which the heading should
-# appear
-sect2.attlist &=
- attribute renderas { "sect1" | "sect3" | "sect4" |
"sect5" }?,
- label.attrib,
- status.attrib,
- common.attrib,
- sect2.role.attrib,
- local.sect2.attrib
-# end of sect2.attlist
-
-# end of sect2.module
-local.sect3.attrib = empty
-sect3.role.attrib = role.attrib
-# doc:A subsection within a Sect2.
-sect3 =
- element sect3 {
- sect3.attlist,
- sect3info?,
- sect.title.content,
- nav.class*,
- ((divcomponent.mix+, (refentry.class* | sect4* | simplesect*))
- | refentry.class+
- | sect4+
- | simplesect+),
- nav.class*
- }
-# end of sect3.element
-
-# Renderas: Indicates the format in which the heading should
-# appear
-sect3.attlist &=
- attribute renderas { "sect1" | "sect2" | "sect4" |
"sect5" }?,
- label.attrib,
- status.attrib,
- common.attrib,
- sect3.role.attrib,
- local.sect3.attrib
-# end of sect3.attlist
-
-# end of sect3.module
-local.sect4.attrib = empty
-sect4.role.attrib = role.attrib
-# doc:A subsection within a Sect3.
-sect4 =
- element sect4 {
- sect4.attlist,
- sect4info?,
- sect.title.content,
- nav.class*,
- ((divcomponent.mix+, (refentry.class* | sect5* | simplesect*))
- | refentry.class+
- | sect5+
- | simplesect+),
- nav.class*
- }
-# end of sect4.element
-
-# Renderas: Indicates the format in which the heading should
-# appear
-sect4.attlist &=
- attribute renderas { "sect1" | "sect2" | "sect3" |
"sect5" }?,
- label.attrib,
- status.attrib,
- common.attrib,
- sect4.role.attrib,
- local.sect4.attrib
-# end of sect4.attlist
-
-# end of sect4.module
-local.sect5.attrib = empty
-sect5.role.attrib = role.attrib
-# doc:A subsection within a Sect4.
-sect5 =
- element sect5 {
- sect5.attlist,
- sect5info?,
- sect.title.content,
- nav.class*,
- ((divcomponent.mix+, (refentry.class* | simplesect*))
- | refentry.class+
- | simplesect+),
- nav.class*
- }
-# end of sect5.element
-
-# Renderas: Indicates the format in which the heading should
-# appear
-sect5.attlist &=
- attribute renderas { "sect1" | "sect2" | "sect3" |
"sect4" }?,
- label.attrib,
- status.attrib,
- common.attrib,
- sect5.role.attrib,
- local.sect5.attrib
-# end of sect5.attlist
-
-# end of sect5.module
-local.simplesect.attrib = empty
-simplesect.role.attrib = role.attrib
-# doc:A section of a document with no subdivisions.
-simplesect =
- element simplesect {
- simplesect.attlist, sect.title.content, divcomponent.mix+
- }
-# end of simplesect.element
-simplesect.attlist &=
- common.attrib, simplesect.role.attrib, local.simplesect.attrib
-# end of simplesect.attlist
-
-# end of simplesect.module
-
-# ......................................................................
-
-# Bibliography .........................................................
-local.bibliography.attrib = empty
-bibliography.role.attrib = role.attrib
-# doc:A bibliography.
-bibliography =
- element bibliography {
- bibliography.attlist,
- bibliographyinfo?,
- bookcomponent.title.content?,
- component.mix*,
- (bibliodiv+ | (biblioentry | bibliomixed)+)
- }
-# end of bibliography.element
-bibliography.attlist &=
- status.attrib,
- common.attrib,
- bibliography.role.attrib,
- local.bibliography.attrib
-# end of bibliography.attlist
-
-# end of bibliography.module
-local.bibliodiv.attrib = empty
-bibliodiv.role.attrib = role.attrib
-# doc:A section of a Bibliography.
-bibliodiv =
- element bibliodiv {
- bibliodiv.attlist,
- sect.title.content?,
- component.mix*,
- (biblioentry | bibliomixed)+
- }
-# end of bibliodiv.element
-bibliodiv.attlist &=
- status.attrib,
- common.attrib,
- bibliodiv.role.attrib,
- local.bibliodiv.attrib
-# end of bibliodiv.attlist
-
-# end of bibliodiv.module
-
-# end of bibliography.content.module
-
-# ......................................................................
-
-# Glossary .............................................................
-local.glossary.attrib = empty
-glossary.role.attrib = role.attrib
-# doc:A glossary.
-glossary =
- element glossary {
- glossary.attlist,
- glossaryinfo?,
- bookcomponent.title.content?,
- component.mix*,
- (glossdiv+ | glossentry+),
- bibliography?
- }
-# end of glossary.element
-glossary.attlist &=
- status.attrib,
- common.attrib,
- glossary.role.attrib,
- local.glossary.attrib
-# end of glossary.attlist
-
-# end of glossary.module
-local.glossdiv.attrib = empty
-glossdiv.role.attrib = role.attrib
-# doc:A division in a Glossary.
-glossdiv =
- element glossdiv {
- glossdiv.attlist, sect.title.content, component.mix*, glossentry+
- }
-# end of glossdiv.element
-glossdiv.attlist &=
- status.attrib,
- common.attrib,
- glossdiv.role.attrib,
- local.glossdiv.attrib
-# end of glossdiv.attlist
-
-# end of glossdiv.module
-
-# end of glossary.content.module
-
-# ......................................................................
-
-# Index and SetIndex ...................................................
-local.indexes.attrib = empty
-indexes.role.attrib = role.attrib
-# doc:An index.
-index =
- element index {
- index.attlist,
- indexinfo?,
- bookcomponent.title.content?,
- component.mix*,
- (indexdiv* | indexentry*)
- }
-# end of index.element
-index.attlist &=
- attribute type { text }?,
- common.attrib,
- indexes.role.attrib,
- local.indexes.attrib
-# end of index.attlist
-
-# doc:An index to a set of books.
-setindex =
- element setindex {
- setindex.attlist,
- setindexinfo?,
- bookcomponent.title.content?,
- component.mix*,
- (indexdiv* | indexentry*)
- }
-# end of setindex.element
-setindex.attlist &=
- common.attrib, indexes.role.attrib, local.indexes.attrib
-# end of setindex.attlist
-
-# end of indexes.module
-
-# SegmentedList in this content is useful for marking up permuted
-# indices.
-local.indexdiv.attrib = empty
-indexdiv.role.attrib = role.attrib
-# doc:A division in an index.
-indexdiv =
- element indexdiv {
- indexdiv.attlist,
- sect.title.content?,
- (indexdivcomponent.mix*, (indexentry+ | segmentedlist))
- }
-# end of indexdiv.element
-indexdiv.attlist &=
- common.attrib, indexdiv.role.attrib, local.indexdiv.attrib
-# end of indexdiv.attlist
-
-# end of indexdiv.module
-
-# Index entries appear in the index, not the text.
-local.indexentry.attrib = empty
-indexentry.role.attrib = role.attrib
-# doc:An entry in an index.
-indexentry =
- element indexentry {
- indexentry.attlist,
- primaryie,
- (seeie | seealsoie)*,
- (secondaryie, (seeie | seealsoie | tertiaryie)*)*
- }
-# end of indexentry.element
-indexentry.attlist &=
- common.attrib, indexentry.role.attrib, local.indexentry.attrib
-# end of indexentry.attlist
-
-# end of indexentry.module
-local.primsecterie.attrib = empty
-primsecterie.role.attrib = role.attrib
-# doc:A primary term in an index entry, not in the text.
-primaryie = element primaryie { primaryie.attlist, ndxterm.char.mix* }
-# end of primaryie.element
-
-# to IndexTerms that these entries represent
-primaryie.attlist &=
- linkends.attrib,
- common.attrib,
- primsecterie.role.attrib,
- local.primsecterie.attrib
-# end of primaryie.attlist
-
-# doc:A secondary term in an index entry, rather than in the text.
-secondaryie =
- element secondaryie { secondaryie.attlist, ndxterm.char.mix* }
-# end of secondaryie.element
-
-# to IndexTerms that these entries represent
-secondaryie.attlist &=
- linkends.attrib,
- common.attrib,
- primsecterie.role.attrib,
- local.primsecterie.attrib
-# end of secondaryie.attlist
-
-# doc:A tertiary term in an index entry, rather than in the text.
-tertiaryie =
- element tertiaryie { tertiaryie.attlist, ndxterm.char.mix* }
-# end of tertiaryie.element
-
-# to IndexTerms that these entries represent
-tertiaryie.attlist &=
- linkends.attrib,
- common.attrib,
- primsecterie.role.attrib,
- local.primsecterie.attrib
-# end of tertiaryie.attlist
-
-# end of primsecterie.module
-local.seeie.attrib = empty
-seeie.role.attrib = role.attrib
-# doc:A See entry in an index, rather than in the text.
-seeie = element seeie { seeie.attlist, ndxterm.char.mix* }
-# end of seeie.element
-
-# to IndexEntry to look up
-seeie.attlist &=
- linkend.attrib, common.attrib, seeie.role.attrib, local.seeie.attrib
-# end of seeie.attlist
-
-# end of seeie.module
-local.seealsoie.attrib = empty
-seealsoie.role.attrib = role.attrib
-# doc:A See also entry in an index, rather than in the text.
-seealsoie = element seealsoie { seealsoie.attlist, ndxterm.char.mix* }
-# end of seealsoie.element
-
-# to related IndexEntries
-seealsoie.attlist &=
- linkends.attrib,
- common.attrib,
- seealsoie.role.attrib,
- local.seealsoie.attrib
-# end of seealsoie.attlist
-
-# end of seealsoie.module
-
-# end of index.content.module
-
-# ......................................................................
-
-# RefEntry .............................................................
-local.refentry.attrib = empty
-refentry.role.attrib = role.attrib
-# doc:A reference page (originally a UNIX man-style reference page).
-refentry =
- element refentry {
- refentry.attlist,
- beginpage?,
- ndxterm.class*,
- refentryinfo?,
- refmeta?,
- (remark | link.char.class)*,
- refnamediv+,
- refsynopsisdiv?,
- (refsect1+ | refsection+)
- }
-# end of refentry.element
-refentry.attlist &=
- status.attrib,
- common.attrib,
- refentry.role.attrib,
- local.refentry.attrib
-# end of refentry.attlist
-
-# end of refentry.module
-local.refmeta.attrib = empty
-refmeta.role.attrib = role.attrib
-# doc:Meta-information for a reference entry.
-refmeta =
- element refmeta {
- refmeta.attlist,
- ndxterm.class*,
- refentrytitle,
- manvolnum?,
- refmiscinfo*,
- ndxterm.class*
- }
-# end of refmeta.element
-refmeta.attlist &=
- common.attrib, refmeta.role.attrib, local.refmeta.attrib
-# end of refmeta.attlist
-
-# end of refmeta.module
-local.refmiscinfo.attrib = empty
-refmiscinfo.role.attrib = role.attrib
-# doc:Meta-information for a reference entry other than the title and volume number.
-refmiscinfo =
- element refmiscinfo { refmiscinfo.attlist, docinfo.char.mix* }
-# end of refmiscinfo.element
-
-# Class: Freely assignable parameter; no default
-refmiscinfo.attlist &=
- attribute class { text }?,
- common.attrib,
- refmiscinfo.role.attrib,
- local.refmiscinfo.attrib
-# end of refmiscinfo.attlist
-
-# end of refmiscinfo.module
-local.refnamediv.attrib = empty
-refnamediv.role.attrib = role.attrib
-# doc:The name, purpose, and classification of a reference page.
-refnamediv =
- element refnamediv {
- refnamediv.attlist,
- refdescriptor?,
- refname+,
- refpurpose,
- refclass*,
- (remark | link.char.class)*
- }
-# end of refnamediv.element
-refnamediv.attlist &=
- common.attrib, refnamediv.role.attrib, local.refnamediv.attrib
-# end of refnamediv.attlist
-
-# end of refnamediv.module
-local.refdescriptor.attrib = empty
-refdescriptor.role.attrib = role.attrib
-# doc:A description of the topic of a reference page.
-refdescriptor =
- element refdescriptor { refdescriptor.attlist, refname.char.mix* }
-# end of refdescriptor.element
-refdescriptor.attlist &=
- common.attrib, refdescriptor.role.attrib, local.refdescriptor.attrib
-# end of refdescriptor.attlist
-
-# end of refdescriptor.module
-local.refname.attrib = empty
-refname.role.attrib = role.attrib
-# doc:The name of (one of) the subject(s) of a reference page.
-refname = element refname { refname.attlist, refname.char.mix* }
-# end of refname.element
-refname.attlist &=
- common.attrib, refname.role.attrib, local.refname.attrib
-# end of refname.attlist
-
-# end of refname.module
-local.refpurpose.attrib = empty
-refpurpose.role.attrib = role.attrib
-# doc:A short (one sentence) synopsis of the topic of a reference page.
-refpurpose =
- element refpurpose { refpurpose.attlist, refinline.char.mix* }
-# end of refpurpose.element
-refpurpose.attlist &=
- common.attrib, refpurpose.role.attrib, local.refpurpose.attrib
-# end of refpurpose.attlist
-
-# end of refpurpose.module
-local.refclass.attrib = empty
-refclass.role.attrib = role.attrib
-# doc:The scope or other indication of applicability of a reference entry.
-refclass = element refclass { refclass.attlist, refclass.char.mix* }
-# end of refclass.element
-refclass.attlist &=
- common.attrib, refclass.role.attrib, local.refclass.attrib
-# end of refclass.attlist
-
-# end of refclass.module
-local.refsynopsisdiv.attrib = empty
-refsynopsisdiv.role.attrib = role.attrib
-# doc:A syntactic synopsis of the subject of the reference page.
-refsynopsisdiv =
- element refsynopsisdiv {
- refsynopsisdiv.attlist,
- refsynopsisdivinfo?,
- refsect.title.content?,
- ((refcomponent.mix+, refsect2*) | refsect2+)
- }
-# end of refsynopsisdiv.element
-refsynopsisdiv.attlist &=
- common.attrib, refsynopsisdiv.role.attrib, local.refsynopsisdiv.attrib
-# end of refsynopsisdiv.attlist
-
-# end of refsynopsisdiv.module
-local.refsection.attrib = empty
-refsection.role.attrib = role.attrib
-# doc:A recursive section in a refentry.
-refsection =
- element refsection {
- refsection.attlist,
- refsectioninfo?,
- refsect.title.content,
- ((refcomponent.mix+, refsection*) | refsection+)
- }
-# end of refsection.element
-refsection.attlist &=
- status.attrib,
- common.attrib,
- refsection.role.attrib,
- local.refsection.attrib
-# end of refsection.attlist
-
-# end of refsection.module
-local.refsect1.attrib = empty
-refsect1.role.attrib = role.attrib
-# doc:A major subsection of a reference entry.
-refsect1 =
- element refsect1 {
- refsect1.attlist,
- refsect1info?,
- refsect.title.content,
- ((refcomponent.mix+, refsect2*) | refsect2+)
- }
-# end of refsect1.element
-refsect1.attlist &=
- status.attrib,
- common.attrib,
- refsect1.role.attrib,
- local.refsect1.attrib
-# end of refsect1.attlist
-
-# end of refsect1.module
-local.refsect2.attrib = empty
-refsect2.role.attrib = role.attrib
-# doc:A subsection of a RefSect1.
-refsect2 =
- element refsect2 {
- refsect2.attlist,
- refsect2info?,
- refsect.title.content,
- ((refcomponent.mix+, refsect3*) | refsect3+)
- }
-# end of refsect2.element
-refsect2.attlist &=
- status.attrib,
- common.attrib,
- refsect2.role.attrib,
- local.refsect2.attrib
-# end of refsect2.attlist
-
-# end of refsect2.module
-local.refsect3.attrib = empty
-refsect3.role.attrib = role.attrib
-# doc:A subsection of a RefSect2.
-refsect3 =
- element refsect3 {
- refsect3.attlist,
- refsect3info?,
- refsect.title.content,
- refcomponent.mix+
- }
-# end of refsect3.element
-refsect3.attlist &=
- status.attrib,
- common.attrib,
- refsect3.role.attrib,
- local.refsect3.attrib
-# end of refsect3.attlist
-
-# end of refsect3.module
-
-# end of refentry.content.module
-
-# ......................................................................
-
-# Article ..............................................................
-
-# An Article is a chapter-level, stand-alone document that is often,
-# but need not be, collected into a Book.
-local.article.attrib = empty
-article.role.attrib = role.attrib
-# doc:An article.
-article =
- element article {
- article.attlist,
- div.title.content?,
- articleinfo?,
- tocchap?,
- lot*,
- bookcomponent.content,
- (nav.class | appendix.class | colophon | ackno)*
- }
-# end of article.element
-
-# Class: Indicates the type of a particular article;
-# all articles have the same structure and general purpose.
-# No default.
-
-# ParentBook: ID of the enclosing Book
-article.attlist &=
- attribute class {
- "journalarticle"
- | "productsheet"
- | "whitepaper"
- | "techreport"
- | "specification"
- | "faq"
- }?,
- attribute parentbook { xsd:IDREF }?,
- status.attrib,
- common.attrib,
- article.role.attrib,
- local.article.attrib
-# end of article.attlist
-
-# end of article.module
-
-# End of DocBook document hierarchy module V4.5 ........................
-
-# ......................................................................
diff --git a/defensive-coding/docbook-schema/.svn/text-base/dbnotnx.rnc.svn-base
b/defensive-coding/docbook-schema/.svn/text-base/dbnotnx.rnc.svn-base
deleted file mode 100644
index 9beb245..0000000
--- a/defensive-coding/docbook-schema/.svn/text-base/dbnotnx.rnc.svn-base
+++ /dev/null
@@ -1,85 +0,0 @@
-# ......................................................................
-
-# DocBook notations module V4.5 ........................................
-
-# File dbnotnx.mod .....................................................
-
-# Copyright 1992-2004 HaL Computer Systems, Inc.,
-# O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
-# Corporation, Norman Walsh, Sun Microsystems, Inc., and the
-# Organization for the Advancement of Structured Information
-# Standards (OASIS).
-#
-# $Id: dbnotnx.mod 6340 2006-10-03 13:23:24Z nwalsh $
-#
-# Permission to use, copy, modify and distribute the DocBook DTD
-# and its accompanying documentation for any purpose and without fee
-# is hereby granted in perpetuity, provided that the above copyright
-# notice and this paragraph appear in all copies. The copyright
-# holders make no representation about the suitability of the DTD for
-# any purpose. It is provided "as is" without expressed or implied
-# warranty.
-#
-# If you modify the DocBook DTD in any way, except for declaring and
-# referencing additional sets of general entities and declaring
-# additional notations, label your DTD as a variant of DocBook. See
-# the maintenance documentation for more information.
-#
-# Please direct all questions, bug reports, or suggestions for
-# changes to the docbook(a)lists.oasis-open.org mailing list. For more
-# information, see
http://www.oasis-open.org/docbook/.
-
-# ......................................................................
-
-# This module contains the notation declarations used by DocBook.
-#
-# In DTD driver files referring to this module, please use an entity
-# declaration that uses the public identifier shown below:
-#
-# <!ENTITY % dbnotn PUBLIC
-# "-//OASIS//ENTITIES DocBook Notations V4.5//EN"
-# "dbnotnx.mod">
-# %dbnotn;
-#
-# See the documentation for detailed information on the parameter
-# entity and module scheme used in DocBook, customizing DocBook and
-# planning for interchange, and changes made since the last release
-# of DocBook.
-
-local.notation.class = notAllowed
-notation.class =
- "BMP"
- | "CGM-CHAR"
- | "CGM-BINARY"
- | "CGM-CLEAR"
- | "DITROFF"
- | "DVI"
- | "EPS"
- | "EQN"
- | "FAX"
- | "GIF"
- | "GIF87a"
- | "GIF89a"
- | "JPG"
- | "JPEG"
- | "IGES"
- | "PCX"
- | "PIC"
- | "PNG"
- | "PS"
- | "SGML"
- | "TBL"
- | "TEX"
- | "TIFF"
- | "WMF"
- | "WPG"
- | "SVG"
- | "PDF"
- | "SWF"
- | "linespecific"
- | local.notation.class
-# WordPerfect Graphic format
-
-# End of DocBook notations module V4.5 .................................
-
-# ......................................................................
diff --git a/defensive-coding/docbook-schema/.svn/text-base/dbpoolx.rnc.svn-base
b/defensive-coding/docbook-schema/.svn/text-base/dbpoolx.rnc.svn-base
deleted file mode 100644
index 47100a3..0000000
--- a/defensive-coding/docbook-schema/.svn/text-base/dbpoolx.rnc.svn-base
+++ /dev/null
@@ -1,5785 +0,0 @@
-# ......................................................................
-
-# DocBook XML information pool module V4.5 .............................
-
-# File dbpoolx.mod .....................................................
-
-# Copyright 1992-2004 HaL Computer Systems, Inc.,
-# O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
-# Corporation, Norman Walsh, Sun Microsystems, Inc., and the
-# Organization for the Advancement of Structured Information
-# Standards (OASIS).
-#
-# $Id: dbpoolx.mod 6340 2006-10-03 13:23:24Z nwalsh $
-#
-# Permission to use, copy, modify and distribute the DocBook XML DTD
-# and its accompanying documentation for any purpose and without fee
-# is hereby granted in perpetuity, provided that the above copyright
-# notice and this paragraph appear in all copies. The copyright
-# holders make no representation about the suitability of the DTD for
-# any purpose. It is provided "as is" without expressed or implied
-# warranty.
-#
-# If you modify the DocBook XML DTD in any way, except for declaring and
-# referencing additional sets of general entities and declaring
-# additional notations, label your DTD as a variant of DocBook. See
-# the maintenance documentation for more information.
-#
-# Please direct all questions, bug reports, or suggestions for
-# changes to the docbook(a)lists.oasis-open.org mailing list. For more
-# information, see
http://www.oasis-open.org/docbook/.
-
-# ......................................................................
-
-# This module contains the definitions for the objects, inline
-# elements, and so on that are available to be used as the main
-# content of DocBook documents. Some elements are useful for general
-# publishing, and others are useful specifically for computer
-# documentation.
-#
-# This module has the following dependencies on other modules:
-#
-# o It assumes that a %notation.class; entity is defined by the
-# driver file or other high-level module. This entity is
-# referenced in the NOTATION attributes for the graphic-related and
-# ModeSpec elements.
-#
-# o It assumes that an appropriately parameterized table module is
-# available for use with the table-related elements.
-#
-# In DTD driver files referring to this module, please use an entity
-# declaration that uses the public identifier shown below:
-#
-# <!ENTITY % dbpool PUBLIC
-# "-//OASIS//ELEMENTS DocBook XML Information Pool V4.5//EN"
-# "dbpoolx.mod">
-# %dbpool;
-#
-# See the documentation for detailed information on the parameter
-# entity and module scheme used in DocBook, customizing DocBook and
-# planning for interchange, and changes made since the last release
-# of DocBook.
-
-# ......................................................................
-
-# Forms entities .......................................................
-
-# These PEs provide the hook by which the forms module can be inserted
-
-# into the DTD.
-
-namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
-
-forminlines.hook = notAllowed
-forms.hook = notAllowed
-# ......................................................................
-
-# General-purpose semantics entities ...................................
-yesorno.attvals = string
-# ......................................................................
-
-# Entities for module inclusions .......................................
-
-# ......................................................................
-
-# Entities for element classes and mixtures ............................
-
-# "Ubiquitous" classes: ndxterm.class and beginpage
-local.ndxterm.class = notAllowed
-ndxterm.class = indexterm | local.ndxterm.class
-# Object-level classes .................................................
-local.list.class = notAllowed
-list.class =
- calloutlist
- | glosslist
- | bibliolist
- | itemizedlist
- | orderedlist
- | segmentedlist
- | simplelist
- | variablelist
- | local.list.class
-local.admon.class = notAllowed
-admon.class =
- caution | important | note | tip | warning | local.admon.class
-local.linespecific.class = notAllowed
-linespecific.class =
- literallayout
- | programlisting
- | programlistingco
- | screen
- | screenco
- | screenshot
- | local.linespecific.class
-local.method.synop.class = notAllowed
-method.synop.class =
- constructorsynopsis
- | destructorsynopsis
- | methodsynopsis
- | local.method.synop.class
-local.synop.class = notAllowed
-synop.class =
- synopsis
- | cmdsynopsis
- | funcsynopsis
- | classsynopsis
- | fieldsynopsis
- | method.synop.class
- | local.synop.class
-local.para.class = notAllowed
-para.class = formalpara | para | simpara | local.para.class
-local.informal.class = notAllowed
-informal.class =
- address
- | blockquote
- | graphic
- | graphicco
- | mediaobject
- | mediaobjectco
- | informalequation
- | informalexample
- | informalfigure
- | informaltable
- | local.informal.class
-local.formal.class = notAllowed
-formal.class = equation | example | figure | table | local.formal.class
-# The DocBook TC may produce an official EBNF module for DocBook.
-
-# This PE provides the hook by which it can be inserted into the DTD.
-ebnf.block.hook = notAllowed
-local.compound.class = notAllowed
-compound.class =
- msgset
- | procedure
- | sidebar
- | qandaset
- | task
- | ebnf.block.hook
- | local.compound.class
-local.genobj.class = notAllowed
-genobj.class =
- anchor | bridgehead | remark | highlights | local.genobj.class
-local.descobj.class = notAllowed
-descobj.class = abstract | authorblurb | epigraph | local.descobj.class
-# Character-level classes ..............................................
-local.xref.char.class = notAllowed
-xref.char.class = footnoteref | xref | biblioref | local.xref.char.class
-local.gen.char.class = notAllowed
-gen.char.class =
- abbrev
- | acronym
- | citation
- | citerefentry
- | citetitle
- | citebiblioid
- | emphasis
- | firstterm
- | foreignphrase
- | glossterm
- | termdef
- | footnote
- | phrase
- | orgname
- | quote
- | trademark
- | wordasword
- | personname
- | local.gen.char.class
-local.link.char.class = notAllowed
-link.char.class = link | olink | ulink | local.link.char.class
-# The DocBook TC may produce an official EBNF module for DocBook.
-
-# This PE provides the hook by which it can be inserted into the DTD.
-ebnf.inline.hook = notAllowed
-local.tech.char.class = notAllowed
-tech.char.class =
- action
- | application
- | classname
- | methodname
- | interfacename
- | exceptionname
- | ooclass
- | oointerface
- | ooexception
- | package
- | command
- | computeroutput
- | database
- | email
- | envar
- | errorcode
- | errorname
- | errortype
- | errortext
- | filename
- | function
- | guibutton
- | guiicon
- | guilabel
- | guimenu
- | guimenuitem
- | guisubmenu
- | hardware
- | interface
- | keycap
- | keycode
- | keycombo
- | keysym
- | literal
- | code
- | constant
- | markup
- | medialabel
- | menuchoice
- | mousebutton
- | option
- | optional
- | parameter
- | prompt
- | property
- | replaceable
- | returnvalue
- | sgmltag
- | structfield
- | structname
- | symbol
- | systemitem
- | uri
- | \token
- | type
- | userinput
- | varname
- | ebnf.inline.hook
- | local.tech.char.class
-local.base.char.class = notAllowed
-base.char.class = anchor | local.base.char.class
-local.docinfo.char.class = notAllowed
-docinfo.char.class =
- author
- | authorinitials
- | corpauthor
- | corpcredit
- | modespec
- | othercredit
- | productname
- | productnumber
- | revhistory
- | local.docinfo.char.class
-local.other.char.class = notAllowed
-other.char.class =
- remark | subscript | superscript | local.other.char.class
-local.inlineobj.char.class = notAllowed
-inlineobj.char.class =
- inlinegraphic
- | inlinemediaobject
- | inlineequation
- | local.inlineobj.char.class
-# ......................................................................
-
-# Entities for content models ..........................................
-formalobject.title.content = title, titleabbrev?
-# Redeclaration placeholder ............................................
-
-# For redeclaring entities that are declared after this point while
-# retaining their references to the entities that are declared before
-# this point
-
-# Object-level mixtures ................................................
-
-# list admn line synp para infm form cmpd gen desc
-# Component mixture X X X X X X X X X X
-# Sidebar mixture X X X X X X X a X
-# Footnote mixture X X X X X
-# Example mixture X X X X X
-# Highlights mixture X X X
-# Paragraph mixture X X X X
-# Admonition mixture X X X X X X b c
-# Figure mixture X X X
-# Table entry mixture X X X X d
-# Glossary def mixture X X X X X e
-# Legal notice mixture X X X X f
-#
-# a. Just Procedure; not Sidebar itself or MsgSet.
-# b. No MsgSet.
-# c. No Highlights.
-# d. Just Graphic; no other informal objects.
-# e. No Anchor, BridgeHead, or Highlights.
-# f. Just BlockQuote; no other informal objects.
-local.component.mix = notAllowed
-component.mix =
- list.class
- | admon.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | compound.class
- | genobj.class
- | descobj.class
- | ndxterm.class
- | beginpage
- | forms.hook
- | local.component.mix
-local.sidebar.mix = notAllowed
-sidebar.mix =
- list.class
- | admon.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | procedure
- | genobj.class
- | ndxterm.class
- | beginpage
- | forms.hook
- | local.sidebar.mix
-local.qandaset.mix = notAllowed
-qandaset.mix =
- list.class
- | admon.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | procedure
- | genobj.class
- | ndxterm.class
- | forms.hook
- | local.qandaset.mix
-local.revdescription.mix = notAllowed
-revdescription.mix =
- list.class
- | admon.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | procedure
- | genobj.class
- | ndxterm.class
- | local.revdescription.mix
-local.footnote.mix = notAllowed
-footnote.mix =
- list.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | local.footnote.mix
-local.example.mix = notAllowed
-example.mix =
- list.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | ndxterm.class
- | beginpage
- | procedure
- | forms.hook
- | local.example.mix
-local.highlights.mix = notAllowed
-highlights.mix =
- list.class
- | admon.class
- | para.class
- | ndxterm.class
- | local.highlights.mix
-# %formal.class; is explicitly excluded from many contexts in which
-# paragraphs are used
-local.para.mix = notAllowed
-para.mix =
- list.class
- | admon.class
- | linespecific.class
- | informal.class
- | formal.class
- | local.para.mix
-local.admon.mix = notAllowed
-admon.mix =
- list.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | procedure
- | sidebar
- | anchor
- | bridgehead
- | remark
- | ndxterm.class
- | beginpage
- | forms.hook
- | local.admon.mix
-local.figure.mix = notAllowed
-figure.mix =
- linespecific.class
- | synop.class
- | informal.class
- | ndxterm.class
- | beginpage
- | forms.hook
- | local.figure.mix
-local.tabentry.mix = notAllowed
-tabentry.mix =
- list.class
- | admon.class
- | linespecific.class
- | para.class
- | graphic
- | mediaobject
- | forms.hook
- | local.tabentry.mix
-local.glossdef.mix = notAllowed
-glossdef.mix =
- list.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | formal.class
- | remark
- | ndxterm.class
- | beginpage
- | local.glossdef.mix
-local.legalnotice.mix = notAllowed
-legalnotice.mix =
- list.class
- | admon.class
- | linespecific.class
- | para.class
- | blockquote
- | ndxterm.class
- | beginpage
- | local.legalnotice.mix
-local.textobject.mix = notAllowed
-textobject.mix =
- list.class
- | admon.class
- | linespecific.class
- | para.class
- | blockquote
- | local.textobject.mix
-local.mediaobject.mix = notAllowed
-mediaobject.mix =
- videoobject
- | audioobject
- | imageobject
- | imageobjectco
- | textobject
- | local.mediaobject.mix
-local.listpreamble.mix = notAllowed
-listpreamble.mix =
- admon.class
- | linespecific.class
- | synop.class
- | para.class
- | informal.class
- | genobj.class
- | descobj.class
- | ndxterm.class
- | beginpage
- | forms.hook
- | local.listpreamble.mix
-# Character-level mixtures .............................................
-
-# sgml.features
-
-# not [sgml.features[
-
-# ]] not sgml.features
-
-# #PCD xref word link cptr base dnfo othr inob (synop)
-# para.char.mix X X X X X X X X X
-# title.char.mix X X X X X X X X X
-# ndxterm.char.mix X X X X X X X X a
-# cptr.char.mix X X X X X a
-# smallcptr.char.mix X b a
-# word.char.mix X c X X X a
-# docinfo.char.mix X d X b X a
-#
-# a. Just InlineGraphic; no InlineEquation.
-# b. Just Replaceable; no other computer terms.
-# c. Just Emphasis and Trademark; no other word elements.
-# d. Just Acronym, Emphasis, and Trademark; no other word elements.
-local.para.char.mix = notAllowed
-para.char.mix =
- text
- | xref.char.class
- | gen.char.class
- | link.char.class
- | tech.char.class
- | base.char.class
- | docinfo.char.class
- | other.char.class
- | inlineobj.char.class
- | synop.class
- | ndxterm.class
- | beginpage
- | forminlines.hook
- | local.para.char.mix
-local.title.char.mix = notAllowed
-title.char.mix =
- text
- | xref.char.class
- | gen.char.class
- | link.char.class
- | tech.char.class
- | base.char.class
- | docinfo.char.class
- | other.char.class
- | inlineobj.char.class
- | ndxterm.class
- | local.title.char.mix
-local.ndxterm.char.mix = notAllowed
-ndxterm.char.mix =
- text
- | xref.char.class
- | gen.char.class
- | link.char.class
- | tech.char.class
- | base.char.class
- | docinfo.char.class
- | other.char.class
- | inlinegraphic
- | inlinemediaobject
- | local.ndxterm.char.mix
-local.cptr.char.mix = notAllowed
-cptr.char.mix =
- text
- | link.char.class
- | tech.char.class
- | base.char.class
- | other.char.class
- | inlinegraphic
- | inlinemediaobject
- | ndxterm.class
- | beginpage
- | local.cptr.char.mix
-local.smallcptr.char.mix = notAllowed
-smallcptr.char.mix =
- text
- | replaceable
- | inlinegraphic
- | inlinemediaobject
- | ndxterm.class
- | beginpage
- | local.smallcptr.char.mix
-local.word.char.mix = notAllowed
-word.char.mix =
- text
- | acronym
- | emphasis
- | trademark
- | link.char.class
- | base.char.class
- | other.char.class
- | inlinegraphic
- | inlinemediaobject
- | ndxterm.class
- | beginpage
- | local.word.char.mix
-local.docinfo.char.mix = notAllowed
-docinfo.char.mix =
- text
- | link.char.class
- | emphasis
- | trademark
- | replaceable
- | other.char.class
- | inlinegraphic
- | inlinemediaobject
- | ndxterm.class
- | local.docinfo.char.mix
-# ENTITY % bibliocomponent.mix (see Bibliographic section, below)
-
-# ENTITY % person.ident.mix (see Bibliographic section, below)
-
-# ......................................................................
-
-# Entities for attributes and attribute components .....................
-
-# Effectivity attributes ...............................................
-
-# Arch: Computer or chip architecture to which element applies; no
-# default
-arch.attrib = attribute arch { text }?
-# Condition: General-purpose effectivity attribute
-condition.attrib = attribute condition { text }?
-# Conformance: Standards conformance characteristics
-conformance.attrib = attribute conformance { xsd:NMTOKENS }?
-# OS: Operating system to which element applies; no default
-os.attrib = attribute os { text }?
-# Revision: Editorial revision to which element belongs; no default
-revision.attrib = attribute revision { text }?
-# Security: Security classification; no default
-security.attrib = attribute security { text }?
-# UserLevel: Level of user experience to which element applies; no
-# default
-userlevel.attrib = attribute userlevel { text }?
-# Vendor: Computer vendor to which element applies; no default
-vendor.attrib = attribute vendor { text }?
-# Wordsize: Computer word size (32 bit, 64 bit, etc.); no default
-wordsize.attrib = attribute wordsize { text }?
-local.effectivity.attrib = empty
-effectivity.attrib =
- arch.attrib,
- condition.attrib,
- conformance.attrib,
- os.attrib,
- revision.attrib,
- security.attrib,
- userlevel.attrib,
- vendor.attrib,
- wordsize.attrib,
- local.effectivity.attrib
-# Common attributes ....................................................
-
-# Id: Unique identifier of element; no default
-id.attrib = attribute id { xsd:ID }?
-# Id: Unique identifier of element; a value must be supplied; no
-# default
-idreq.attrib = attribute id { xsd:ID }
-# Lang: Indicator of language in which element is written, for
-# translation, character set management, etc.; no default
-lang.attrib = attribute lang { text }?
-# Remap: Previous role of element before conversion; no default
-remap.attrib = attribute remap { text }?
-# Role: New role of element in local environment; no default
-role.attrib = attribute role { text }?
-# XRefLabel: Alternate labeling string for XRef text generation;
-# default is usually title or other appropriate label text already
-# contained in element
-xreflabel.attrib = attribute xreflabel { text }?
-# RevisionFlag: Revision status of element; default is that element
-# wasn't revised
-revisionflag.attrib =
- attribute revisionflag { "changed" | "added" | "deleted"
| "off" }?
-local.common.attrib = empty
-# dir: Bidirectional override
-dir.attrib = attribute dir { "ltr" | "rtl" | "lro" |
"rlo" }?
-# xml:base: base URI
-xml-base.attrib = attribute xml:base { text }?
-# Role is included explicitly on each element
-common.attrib =
- id.attrib,
- lang.attrib,
- remap.attrib,
- xreflabel.attrib,
- revisionflag.attrib,
- effectivity.attrib,
- dir.attrib,
- xml-base.attrib,
- local.common.attrib
-# Role is included explicitly on each element
-idreq.common.attrib =
- idreq.attrib,
- lang.attrib,
- remap.attrib,
- xreflabel.attrib,
- revisionflag.attrib,
- effectivity.attrib,
- dir.attrib,
- xml-base.attrib,
- local.common.attrib
-# Semi-common attributes and other attribute entities ..................
-local.graphics.attrib = empty
-# EntityRef: Name of an external entity containing the content
-# of the graphic
-
-# FileRef: Filename, qualified by a pathname if desired,
-# designating the file containing the content of the graphic
-
-# Format: Notation of the element content, if any
-
-# SrcCredit: Information about the source of the Graphic
-
-# Width: Same as CALS reprowid (desired width)
-
-# Depth: Same as CALS reprodep (desired depth)
-
-# Align: Same as CALS hplace with 'none' removed; #IMPLIED means
-# application-specific
-
-# Scale: Conflation of CALS hscale and vscale
-
-# Scalefit: Same as CALS scalefit
-graphics.attrib =
- attribute entityref { xsd:ENTITY }?,
- attribute fileref { text }?,
- attribute format { notation.class }?,
- attribute srccredit { text }?,
- attribute width { text }?,
- attribute contentwidth { text }?,
- attribute depth { text }?,
- attribute contentdepth { text }?,
- attribute align { "left" | "right" | "center" }?,
- attribute valign { "top" | "middle" | "bottom" }?,
- attribute scale { text }?,
- attribute scalefit { yesorno.attvals }?,
- local.graphics.attrib
-local.keyaction.attrib = empty
-# Action: Key combination type; default is unspecified if one
-# child element, Simul if there is more than one; if value is
-# Other, the OtherAction attribute must have a nonempty value
-
-# OtherAction: User-defined key combination type
-keyaction.attrib =
- attribute action {
- "click" | "double-click" | "press" | "seq" |
"simul" | "other"
- }?,
- attribute otheraction { text }?,
- local.keyaction.attrib
-# Label: Identifying number or string; default is usually the
-# appropriate number or string autogenerated by a formatter
-label.attrib = attribute label { text }?
-# xml:space: whitespace treatment
-xml-space.attrib = attribute xml:space { "preserve" }?
-# Format: whether element is assumed to contain significant white
-# space
-linespecific.attrib =
- [ a:defaultValue = "linespecific" ]
- attribute format { "linespecific" }?,
- xml-space.attrib,
- attribute linenumbering { "numbered" | "unnumbered" }?,
- attribute continuation { "continues" | "restarts" }?,
- attribute startinglinenumber { text }?,
- attribute language { text }?
-# Linkend: link to related information; no default
-linkend.attrib = attribute linkend { xsd:IDREF }?
-# Linkend: required link to related information
-linkendreq.attrib = attribute linkend { xsd:IDREF }
-# Linkends: link to one or more sets of related information; no
-# default
-linkends.attrib = attribute linkends { xsd:IDREFS }?
-local.mark.attrib = empty
-mark.attrib =
- attribute mark { text }?,
- local.mark.attrib
-# MoreInfo: whether element's content has an associated RefEntry
-moreinfo.attrib =
- [ a:defaultValue = "none" ]
- attribute moreinfo { "refentry" | "none" }?
-# Pagenum: number of page on which element appears; no default
-pagenum.attrib = attribute pagenum { text }?
-local.status.attrib = empty
-# Status: Editorial or publication status of the element
-# it applies to, such as "in review" or "approved for distribution"
-status.attrib =
- attribute status { text }?,
- local.status.attrib
-# Width: width of the longest line in the element to which it
-# pertains, in number of characters
-width.attrib = attribute width { text }?
-# ......................................................................
-
-# Title elements .......................................................
-local.title.attrib = empty
-title.role.attrib = role.attrib
-# doc:The text of the title of a section of a document or of a formal block-level
element.
-title = element title { title.attlist, title.char.mix* }
-# end of title.element
-title.attlist &=
- pagenum.attrib, common.attrib, title.role.attrib, local.title.attrib
-# end of title.attlist
-
-# end of title.module
-local.titleabbrev.attrib = empty
-titleabbrev.role.attrib = role.attrib
-# doc:The abbreviation of a Title.
-titleabbrev =
- element titleabbrev { titleabbrev.attlist, title.char.mix* }
-# end of titleabbrev.element
-titleabbrev.attlist &=
- common.attrib, titleabbrev.role.attrib, local.titleabbrev.attrib
-# end of titleabbrev.attlist
-
-# end of titleabbrev.module
-local.subtitle.attrib = empty
-subtitle.role.attrib = role.attrib
-# doc:The subtitle of a document.
-subtitle = element subtitle { subtitle.attlist, title.char.mix* }
-# end of subtitle.element
-subtitle.attlist &=
- common.attrib, subtitle.role.attrib, local.subtitle.attrib
-# end of subtitle.attlist
-
-# end of subtitle.module
-
-# ......................................................................
-
-# Bibliographic entities and elements ..................................
-
-# The bibliographic elements are typically used in the document
-# hierarchy. They do not appear in content models of information
-# pool elements. See also the document information elements,
-# below.
-local.person.ident.mix = notAllowed
-person.ident.mix =
- honorific
- | firstname
- | surname
- | lineage
- | othername
- | affiliation
- | authorblurb
- | contrib
- | local.person.ident.mix
-local.bibliocomponent.mix = notAllowed
-bibliocomponent.mix =
- abbrev
- | abstract
- | address
- | artpagenums
- | author
- | authorgroup
- | authorinitials
- | bibliomisc
- | biblioset
- | collab
- | confgroup
- | contractnum
- | contractsponsor
- | copyright
- | corpauthor
- | corpname
- | corpcredit
- | date
- | edition
- | editor
- | invpartnumber
- | isbn
- | issn
- | issuenum
- | orgname
- | biblioid
- | citebiblioid
- | bibliosource
- | bibliorelation
- | bibliocoverage
- | othercredit
- | pagenums
- | printhistory
- | productname
- | productnumber
- | pubdate
- | publisher
- | publishername
- | pubsnumber
- | releaseinfo
- | revhistory
- | seriesvolnums
- | subtitle
- | title
- | titleabbrev
- | volumenum
- | citetitle
- | personname
- | person.ident.mix
- | ndxterm.class
- | local.bibliocomponent.mix
-# I don't think this is well placed, but it needs to be here because of
-
-# the reference to bibliocomponent.mix
-local.info.class = notAllowed
-info.class =
- graphic
- | mediaobject
- | legalnotice
- | modespec
- | subjectset
- | keywordset
- | itermset
- | bibliocomponent.mix
- | local.info.class
-# BiblioList ........................
-local.bibliolist.attrib = empty
-bibliolist.role.attrib = role.attrib
-# doc:A wrapper for a set of bibliography entries.
-bibliolist =
- element bibliolist {
- bibliolist.attlist,
- blockinfo?,
- formalobject.title.content?,
- (biblioentry | bibliomixed)+
- }
-# end of bibliolist.element
-bibliolist.attlist &=
- common.attrib, bibliolist.role.attrib, local.bibliolist.attrib
-# end of bibliolist.attlist
-
-# end of bibliolist.module
-local.biblioentry.attrib = empty
-biblioentry.role.attrib = role.attrib
-# doc:An entry in a Bibliography.
-biblioentry =
- element biblioentry {
- biblioentry.attlist, (articleinfo | bibliocomponent.mix)+
- }
-# end of biblioentry.element
-biblioentry.attlist &=
- common.attrib, biblioentry.role.attrib, local.biblioentry.attrib
-# end of biblioentry.attlist
-
-# end of biblioentry.module
-local.bibliomixed.attrib = empty
-bibliomixed.role.attrib = role.attrib
-# doc:An entry in a Bibliography.
-bibliomixed =
- element bibliomixed {
- bibliomixed.attlist, (text | bibliocomponent.mix | bibliomset)*
- }
-# end of bibliomixed.element
-bibliomixed.attlist &=
- common.attrib, bibliomixed.role.attrib, local.bibliomixed.attrib
-# end of bibliomixed.attlist
-
-# end of bibliomixed.module
-local.articleinfo.attrib = empty
-articleinfo.role.attrib = role.attrib
-# doc:Meta-information for an Article.
-articleinfo = element articleinfo { articleinfo.attlist, info.class+ }
-# end of articleinfo.element
-articleinfo.attlist &=
- common.attrib, articleinfo.role.attrib, local.articleinfo.attrib
-# end of articleinfo.attlist
-
-# end of articleinfo.module
-local.biblioset.attrib = empty
-biblioset.role.attrib = role.attrib
-# doc:A "raw" container for related bibliographic information.
-biblioset =
- element biblioset { biblioset.attlist, bibliocomponent.mix+ }
-# end of biblioset.element
-
-# Relation: Relationship of elements contained within BiblioSet
-biblioset.attlist &=
- attribute relation { text }?,
- common.attrib,
- biblioset.role.attrib,
- local.biblioset.attrib
-# end of biblioset.attlist
-
-# end of biblioset.module
-bibliomset.role.attrib = role.attrib
-local.bibliomset.attrib = empty
-# doc:A "cooked" container for related bibliographic information.
-bibliomset =
- element bibliomset {
- bibliomset.attlist, (text | bibliocomponent.mix | bibliomset)*
- }
-# end of bibliomset.element
-
-# Relation: Relationship of elements contained within BiblioMSet
-bibliomset.attlist &=
- attribute relation { text }?,
- common.attrib,
- bibliomset.role.attrib,
- local.bibliomset.attrib
-# end of bibliomset.attlist
-
-# end of bibliomset.module
-local.bibliomisc.attrib = empty
-bibliomisc.role.attrib = role.attrib
-# doc:Untyped bibliographic information.
-bibliomisc = element bibliomisc { bibliomisc.attlist, para.char.mix* }
-# end of bibliomisc.element
-bibliomisc.attlist &=
- common.attrib, bibliomisc.role.attrib, local.bibliomisc.attrib
-# end of bibliomisc.attlist
-
-# end of bibliomisc.module
-
-# ......................................................................
-
-# Subject, Keyword, and ITermSet elements ..............................
-local.subjectset.attrib = empty
-subjectset.role.attrib = role.attrib
-# doc:A set of terms describing the subject matter of a document.
-subjectset = element subjectset { subjectset.attlist, subject+ }
-# end of subjectset.element
-
-# Scheme: Controlled vocabulary employed in SubjectTerms
-subjectset.attlist &=
- attribute scheme { xsd:NMTOKEN }?,
- common.attrib,
- subjectset.role.attrib,
- local.subjectset.attrib
-# end of subjectset.attlist
-
-# end of subjectset.module
-local.subject.attrib = empty
-subject.role.attrib = role.attrib
-# doc:One of a group of terms describing the subject matter of a document.
-subject = element subject { subject.attlist, subjectterm+ }
-# end of subject.element
-
-# Weight: Ranking of this group of SubjectTerms relative
-# to others, 0 is low, no highest value specified
-subject.attlist &=
- attribute weight { text }?,
- common.attrib,
- subject.role.attrib,
- local.subject.attrib
-# end of subject.attlist
-
-# end of subject.module
-local.subjectterm.attrib = empty
-subjectterm.role.attrib = role.attrib
-# doc:A term in a group of terms describing the subject matter of a document.
-subjectterm = element subjectterm { subjectterm.attlist, text }
-# end of subjectterm.element
-subjectterm.attlist &=
- common.attrib, subjectterm.role.attrib, local.subjectterm.attrib
-# end of subjectterm.attlist
-
-# end of subjectterm.module
-
-# end of subjectset.content.module
-local.keywordset.attrib = empty
-keywordset.role.attrib = role.attrib
-# doc:A set of keywords describing the content of a document.
-keywordset = element keywordset { keywordset.attlist, keyword+ }
-# end of keywordset.element
-keywordset.attlist &=
- common.attrib, keywordset.role.attrib, local.keywordset.attrib
-# end of keywordset.attlist
-
-# end of keywordset.module
-local.keyword.attrib = empty
-keyword.role.attrib = role.attrib
-# doc:One of a set of keywords describing the content of a document.
-keyword = element keyword { keyword.attlist, text }
-# end of keyword.element
-keyword.attlist &=
- common.attrib, keyword.role.attrib, local.keyword.attrib
-# end of keyword.attlist
-
-# end of keyword.module
-
-# end of keywordset.content.module
-local.itermset.attrib = empty
-itermset.role.attrib = role.attrib
-# doc:A set of index terms in the meta-information of a document.
-itermset = element itermset { itermset.attlist, indexterm+ }
-# end of itermset.element
-itermset.attlist &=
- common.attrib, itermset.role.attrib, local.itermset.attrib
-# end of itermset.attlist
-
-# end of itermset.module
-
-# Bibliographic info for "blocks"
-local.blockinfo.attrib = empty
-blockinfo.role.attrib = role.attrib
-# doc:Meta-information for a block element.
-blockinfo = element blockinfo { blockinfo.attlist, info.class+ }
-# end of blockinfo.element
-blockinfo.attlist &=
- common.attrib, blockinfo.role.attrib, local.blockinfo.attrib
-# end of blockinfo.attlist
-
-# end of blockinfo.module
-
-# ......................................................................
-
-# Compound (section-ish) elements ......................................
-
-# Message set ......................
-local.msgset.attrib = empty
-msgset.role.attrib = role.attrib
-# doc:A detailed set of messages, usually error messages.
-msgset =
- element msgset {
- msgset.attlist,
- blockinfo?,
- formalobject.title.content?,
- (msgentry+ | simplemsgentry+)
- }
-# end of msgset.element
-msgset.attlist &= common.attrib, msgset.role.attrib, local.msgset.attrib
-# end of msgset.attlist
-
-# end of msgset.module
-local.msgentry.attrib = empty
-msgentry.role.attrib = role.attrib
-# doc:A wrapper for an entry in a message set.
-msgentry =
- element msgentry { msgentry.attlist, msg+, msginfo?, msgexplan* }
-# end of msgentry.element
-msgentry.attlist &=
- common.attrib, msgentry.role.attrib, local.msgentry.attrib
-# end of msgentry.attlist
-
-# end of msgentry.module
-local.simplemsgentry.attrib = empty
-simplemsgentry.role.attrib = role.attrib
-# doc:A wrapper for a simpler entry in a message set.
-simplemsgentry =
- element simplemsgentry { simplemsgentry.attlist, msgtext, msgexplan+ }
-# end of simplemsgentry.element
-simplemsgentry.attlist &=
- attribute audience { text }?,
- attribute level { text }?,
- attribute origin { text }?,
- common.attrib,
- simplemsgentry.role.attrib,
- local.simplemsgentry.attrib
-# end of simplemsgentry.attlist
-
-# end of simplemsgentry.module
-local.msg.attrib = empty
-msg.role.attrib = role.attrib
-# doc:A message in a message set.
-msg = element msg { msg.attlist, title?, msgmain, (msgsub | msgrel)* }
-# end of msg.element
-msg.attlist &= common.attrib, msg.role.attrib, local.msg.attrib
-# end of msg.attlist
-
-# end of msg.module
-local.msgmain.attrib = empty
-msgmain.role.attrib = role.attrib
-# doc:The primary component of a message in a message set.
-msgmain = element msgmain { msgmain.attlist, title?, msgtext }
-# end of msgmain.element
-msgmain.attlist &=
- common.attrib, msgmain.role.attrib, local.msgmain.attrib
-# end of msgmain.attlist
-
-# end of msgmain.module
-local.msgsub.attrib = empty
-msgsub.role.attrib = role.attrib
-# doc:A subcomponent of a message in a message set.
-msgsub = element msgsub { msgsub.attlist, title?, msgtext }
-# end of msgsub.element
-msgsub.attlist &= common.attrib, msgsub.role.attrib, local.msgsub.attrib
-# end of msgsub.attlist
-
-# end of msgsub.module
-local.msgrel.attrib = empty
-msgrel.role.attrib = role.attrib
-# doc:A related component of a message in a message set.
-msgrel = element msgrel { msgrel.attlist, title?, msgtext }
-# end of msgrel.element
-msgrel.attlist &= common.attrib, msgrel.role.attrib, local.msgrel.attrib
-# end of msgrel.attlist
-
-# end of msgrel.module
-
-# MsgText (defined in the Inlines section, below)
-local.msginfo.attrib = empty
-msginfo.role.attrib = role.attrib
-# doc:Information about a message in a message set.
-msginfo =
- element msginfo { msginfo.attlist, (msglevel | msgorig | msgaud)* }
-# end of msginfo.element
-msginfo.attlist &=
- common.attrib, msginfo.role.attrib, local.msginfo.attrib
-# end of msginfo.attlist
-
-# end of msginfo.module
-local.msglevel.attrib = empty
-msglevel.role.attrib = role.attrib
-# doc:The level of importance or severity of a message in a message set.
-msglevel = element msglevel { msglevel.attlist, smallcptr.char.mix* }
-# end of msglevel.element
-msglevel.attlist &=
- common.attrib, msglevel.role.attrib, local.msglevel.attrib
-# end of msglevel.attlist
-
-# end of msglevel.module
-local.msgorig.attrib = empty
-msgorig.role.attrib = role.attrib
-# doc:The origin of a message in a message set.
-msgorig = element msgorig { msgorig.attlist, smallcptr.char.mix* }
-# end of msgorig.element
-msgorig.attlist &=
- common.attrib, msgorig.role.attrib, local.msgorig.attrib
-# end of msgorig.attlist
-
-# end of msgorig.module
-local.msgaud.attrib = empty
-msgaud.role.attrib = role.attrib
-# doc:The audience to which a message in a message set is relevant.
-msgaud = element msgaud { msgaud.attlist, para.char.mix* }
-# end of msgaud.element
-msgaud.attlist &= common.attrib, msgaud.role.attrib, local.msgaud.attrib
-# end of msgaud.attlist
-
-# end of msgaud.module
-local.msgexplan.attrib = empty
-msgexplan.role.attrib = role.attrib
-# doc:Explanatory material relating to a message in a message set.
-msgexplan =
- element msgexplan { msgexplan.attlist, title?, component.mix+ }
-# end of msgexplan.element
-msgexplan.attlist &=
- common.attrib, msgexplan.role.attrib, local.msgexplan.attrib
-# end of msgexplan.attlist
-
-# end of msgexplan.module
-
-# end of msgset.content.module
-local.task.attrib = empty
-task.role.attrib = role.attrib
-# doc:A task to be completed.
-task =
- element task {
- task.attlist,
- blockinfo?,
- ndxterm.class*,
- formalobject.title.content,
- tasksummary?,
- taskprerequisites?,
- procedure,
- example*,
- taskrelated?
- }
-# end of task.element
-task.attlist &= common.attrib, task.role.attrib, local.task.attrib
-# end of task.attlist
-
-# end of task.module
-local.tasksummary.attrib = empty
-tasksummary.role.attrib = role.attrib
-# doc:A summary of a task.
-tasksummary =
- element tasksummary {
- tasksummary.attlist,
- blockinfo?,
- formalobject.title.content?,
- component.mix+
- }
-# end of tasksummary.element
-tasksummary.attlist &=
- common.attrib, tasksummary.role.attrib, local.tasksummary.attrib
-# end of tasksummary.attlist
-
-# end of tasksummary.module
-local.taskprerequisites.attrib = empty
-taskprerequisites.role.attrib = role.attrib
-# doc:The prerequisites for a task.
-taskprerequisites =
- element taskprerequisites {
- taskprerequisites.attlist,
- blockinfo?,
- formalobject.title.content?,
- component.mix+
- }
-# end of taskprerequisites.element
-taskprerequisites.attlist &=
- common.attrib,
- taskprerequisites.role.attrib,
- local.taskprerequisites.attrib
-# end of taskprerequisites.attlist
-
-# end of taskprerequisites.module
-local.taskrelated.attrib = empty
-taskrelated.role.attrib = role.attrib
-# doc:Information related to a task.
-taskrelated =
- element taskrelated {
- taskrelated.attlist,
- blockinfo?,
- formalobject.title.content?,
- component.mix+
- }
-# end of taskrelated.element
-taskrelated.attlist &=
- common.attrib, taskrelated.role.attrib, local.taskrelated.attrib
-# end of taskrelated.attlist
-
-# end of taskrelated.module
-
-# end of task.content.module
-
-# QandASet ........................
-local.qandaset.attrib = empty
-qandaset.role.attrib = role.attrib
-# doc:A question-and-answer set.
-qandaset =
- element qandaset {
- qandaset.attlist,
- blockinfo?,
- formalobject.title.content?,
- qandaset.mix*,
- (qandadiv+ | qandaentry+)
- }
-# end of qandaset.element
-qandaset.attlist &=
- attribute defaultlabel { "qanda" | "number" | "none" }?,
- common.attrib,
- qandaset.role.attrib,
- local.qandaset.attrib
-# end of qandaset.attlist
-
-# end of qandaset.module
-local.qandadiv.attrib = empty
-qandadiv.role.attrib = role.attrib
-# doc:A titled division in a QandASet.
-qandadiv =
- element qandadiv {
- qandadiv.attlist,
- blockinfo?,
- formalobject.title.content?,
- qandaset.mix*,
- (qandadiv+ | qandaentry+)
- }
-# end of qandadiv.element
-qandadiv.attlist &=
- common.attrib, qandadiv.role.attrib, local.qandadiv.attrib
-# end of qandadiv.attlist
-
-# end of qandadiv.module
-local.qandaentry.attrib = empty
-qandaentry.role.attrib = role.attrib
-# doc:A question/answer set within a QandASet.
-qandaentry =
- element qandaentry {
- qandaentry.attlist, blockinfo?, revhistory?, question, answer*
- }
-# end of qandaentry.element
-qandaentry.attlist &=
- common.attrib, qandaentry.role.attrib, local.qandaentry.attrib
-# end of qandaentry.attlist
-
-# end of qandaentry.module
-local.question.attrib = empty
-question.role.attrib = role.attrib
-# doc:A question in a QandASet.
-question = element question { question.attlist, label?, qandaset.mix+ }
-# end of question.element
-question.attlist &=
- common.attrib, question.role.attrib, local.question.attrib
-# end of question.attlist
-
-# end of question.module
-local.answer.attrib = empty
-answer.role.attrib = role.attrib
-# doc:An answer to a question posed in a QandASet.
-answer =
- element answer { answer.attlist, label?, qandaset.mix*, qandaentry* }
-# end of answer.element
-answer.attlist &= common.attrib, answer.role.attrib, local.answer.attrib
-# end of answer.attlist
-
-# end of answer.module
-local.label.attrib = empty
-label.role.attrib = role.attrib
-# doc:A label on a Question or Answer.
-label = element label { label.attlist, word.char.mix* }
-# end of label.element
-label.attlist &= common.attrib, label.role.attrib, local.label.attrib
-# end of label.attlist
-
-# end of label.module
-
-# end of qandaset.content.module
-
-# Procedure ........................
-local.procedure.attrib = empty
-procedure.role.attrib = role.attrib
-# doc:A list of operations to be performed in a well-defined sequence.
-procedure =
- element procedure {
- procedure.attlist,
- blockinfo?,
- formalobject.title.content?,
- component.mix*,
- step+
- }
-# end of procedure.element
-procedure.attlist &=
- common.attrib, procedure.role.attrib, local.procedure.attrib
-# end of procedure.attlist
-
-# end of procedure.module
-local.step.attrib = empty
-step.role.attrib = role.attrib
-# doc:A unit of action in a procedure.
-step =
- element step {
- step.attlist,
- title?,
- ((component.mix+,
- ((substeps | stepalternatives), component.mix*)?)
- | ((substeps | stepalternatives), component.mix*))
- }
-# end of step.element
-
-# Performance: Whether the Step must be performed
-
-# not #REQUIRED!
-step.attlist &=
- [ a:defaultValue = "required" ]
- attribute performance { "optional" | "required" }?,
- common.attrib,
- step.role.attrib,
- local.step.attrib
-# end of step.attlist
-
-# end of step.module
-local.substeps.attrib = empty
-substeps.role.attrib = role.attrib
-# doc:A wrapper for steps that occur within steps in a procedure.
-substeps = element substeps { substeps.attlist, step+ }
-# end of substeps.element
-
-# Performance: whether entire set of substeps must be performed
-
-# not #REQUIRED!
-substeps.attlist &=
- [ a:defaultValue = "required" ]
- attribute performance { "optional" | "required" }?,
- common.attrib,
- substeps.role.attrib,
- local.substeps.attrib
-# end of substeps.attlist
-
-# end of substeps.module
-local.stepalternatives.attrib = empty
-stepalternatives.role.attrib = role.attrib
-# doc:Alternative steps in a procedure.
-stepalternatives =
- element stepalternatives { stepalternatives.attlist, step+ }
-# end of stepalternatives.element
-
-# Performance: Whether (one of) the alternatives must be performed
-
-# not #REQUIRED!
-stepalternatives.attlist &=
- [ a:defaultValue = "required" ]
- attribute performance { "optional" | "required" }?,
- common.attrib,
- stepalternatives.role.attrib,
- local.stepalternatives.attrib
-# end of stepalternatives.attlist
-
-# end of stepalternatives.module
-
-# end of procedure.content.module
-
-# Sidebar ..........................
-local.sidebarinfo.attrib = empty
-sidebarinfo.role.attrib = role.attrib
-# doc:Meta-information for a Sidebar.
-sidebarinfo = element sidebarinfo { sidebarinfo.attlist, info.class+ }
-# end of sidebarinfo.element
-sidebarinfo.attlist &=
- common.attrib, sidebarinfo.role.attrib, local.sidebarinfo.attrib
-# end of sidebarinfo.attlist
-
-# end of sidebarinfo.module
-local.sidebar.attrib = empty
-sidebar.role.attrib = role.attrib
-# doc:A portion of a document that is isolated from the main narrative flow.
-sidebar =
- element sidebar {
- sidebar.attlist,
- sidebarinfo?,
- formalobject.title.content?,
- sidebar.mix+
- }
-# end of sidebar.element
-sidebar.attlist &=
- common.attrib, sidebar.role.attrib, local.sidebar.attrib
-# end of sidebar.attlist
-
-# end of sidebar.module
-
-# end of sidebar.content.model
-
-# ......................................................................
-
-# Paragraph-related elements ...........................................
-local.abstract.attrib = empty
-abstract.role.attrib = role.attrib
-# doc:A summary.
-abstract = element abstract { abstract.attlist, title?, para.class+ }
-# end of abstract.element
-abstract.attlist &=
- common.attrib, abstract.role.attrib, local.abstract.attrib
-# end of abstract.attlist
-
-# end of abstract.module
-local.authorblurb.attrib = empty
-authorblurb.role.attrib = role.attrib
-# doc:A short description or note about an author.
-authorblurb =
- element authorblurb { authorblurb.attlist, title?, para.class+ }
-# end of authorblurb.element
-authorblurb.attlist &=
- common.attrib, authorblurb.role.attrib, local.authorblurb.attrib
-# end of authorblurb.attlist
-
-# end of authorblurb.module
-local.personblurb.attrib = empty
-personblurb.role.attrib = role.attrib
-# doc:A short description or note about a person.
-personblurb =
- element personblurb { personblurb.attlist, title?, para.class+ }
-# end of personblurb.element
-personblurb.attlist &=
- common.attrib, personblurb.role.attrib, local.personblurb.attrib
-# end of personblurb.attlist
-
-# end of personblurb.module
-local.blockquote.attrib = empty
-blockquote.role.attrib = role.attrib
-# doc:A quotation set off from the main text.
-blockquote =
- element blockquote {
- blockquote.attlist, blockinfo?, title?, attribution?, component.mix+
- }
-# end of blockquote.element
-blockquote.attlist &=
- common.attrib, blockquote.role.attrib, local.blockquote.attrib
-# end of blockquote.attlist
-
-# end of blockquote.module
-local.attribution.attrib = empty
-attribution.role.attrib = role.attrib
-# doc:The source of a block quote or epigraph.
-attribution =
- element attribution { attribution.attlist, para.char.mix* }
-# end of attribution.element
-attribution.attlist &=
- common.attrib, attribution.role.attrib, local.attribution.attrib
-# end of attribution.attlist
-
-# end of attribution.module
-local.bridgehead.attrib = empty
-bridgehead.role.attrib = role.attrib
-# doc:A free-floating heading.
-bridgehead = element bridgehead { bridgehead.attlist, title.char.mix* }
-# end of bridgehead.element
-
-# Renderas: Indicates the format in which the BridgeHead
-# should appear
-bridgehead.attlist &=
- attribute renderas {
- "other" | "sect1" | "sect2" | "sect3" |
"sect4" | "sect5"
- }?,
- common.attrib,
- bridgehead.role.attrib,
- local.bridgehead.attrib
-# end of bridgehead.attlist
-
-# end of bridgehead.module
-local.remark.attrib = empty
-remark.role.attrib = role.attrib
-# doc:A remark (or comment) intended for presentation in a draft manuscript.
-remark = element remark { remark.attlist, para.char.mix* }
-# end of remark.element
-remark.attlist &= common.attrib, remark.role.attrib, local.remark.attrib
-# end of remark.attlist
-
-# end of remark.module
-local.epigraph.attrib = empty
-epigraph.role.attrib = role.attrib
-# doc:A short inscription at the beginning of a document or component.
-epigraph =
- element epigraph {
- epigraph.attlist, attribution?, (para.class | literallayout)+
- }
-# end of epigraph.element
-epigraph.attlist &=
- common.attrib, epigraph.role.attrib, local.epigraph.attrib
-# end of epigraph.attlist
-
-# Attribution (defined above)
-
-# end of epigraph.module
-local.footnote.attrib = empty
-footnote.role.attrib = role.attrib
-# doc:A footnote.
-footnote = element footnote { footnote.attlist, footnote.mix+ }
-# end of footnote.element
-footnote.attlist &=
- label.attrib,
- common.attrib,
- footnote.role.attrib,
- local.footnote.attrib
-# end of footnote.attlist
-
-# end of footnote.module
-local.highlights.attrib = empty
-highlights.role.attrib = role.attrib
-# doc:A summary of the main points of the discussed component.
-highlights = element highlights { highlights.attlist, highlights.mix+ }
-# end of highlights.element
-highlights.attlist &=
- common.attrib, highlights.role.attrib, local.highlights.attrib
-# end of highlights.attlist
-
-# end of highlights.module
-local.formalpara.attrib = empty
-formalpara.role.attrib = role.attrib
-# doc:A paragraph with a title.
-formalpara =
- element formalpara { formalpara.attlist, title, ndxterm.class*, para }
-# end of formalpara.element
-formalpara.attlist &=
- common.attrib, formalpara.role.attrib, local.formalpara.attrib
-# end of formalpara.attlist
-
-# end of formalpara.module
-local.para.attrib = empty
-para.role.attrib = role.attrib
-# doc:A paragraph.
-para = element para { para.attlist, (para.char.mix | para.mix)* }
-# end of para.element
-para.attlist &= common.attrib, para.role.attrib, local.para.attrib
-# end of para.attlist
-
-# end of para.module
-local.simpara.attrib = empty
-simpara.role.attrib = role.attrib
-# doc:A paragraph that contains only text and inline markup, no block elements.
-simpara = element simpara { simpara.attlist, para.char.mix* }
-# end of simpara.element
-simpara.attlist &=
- common.attrib, simpara.role.attrib, local.simpara.attrib
-# end of simpara.attlist
-
-# end of simpara.module
-local.admon.attrib = empty
-admon.role.attrib = role.attrib
-# doc:A note of caution.
-caution = element caution { caution.attlist, title?, admon.mix+ }
-# end of caution.element
-caution.attlist &= common.attrib, admon.role.attrib, local.admon.attrib
-# end of caution.attlist
-
-# doc:An admonition set off from the text.
-important = element important { important.attlist, title?, admon.mix+ }
-# end of important.element
-important.attlist &=
- common.attrib, admon.role.attrib, local.admon.attrib
-# end of important.attlist
-
-# doc:A message set off from the text.
-note = element note { note.attlist, title?, admon.mix+ }
-# end of note.element
-note.attlist &= common.attrib, admon.role.attrib, local.admon.attrib
-# end of note.attlist
-
-# doc:A suggestion to the user, set off from the text.
-tip = element tip { tip.attlist, title?, admon.mix+ }
-# end of tip.element
-tip.attlist &= common.attrib, admon.role.attrib, local.admon.attrib
-# end of tip.attlist
-
-# doc:An admonition set off from the text.
-warning = element warning { warning.attlist, title?, admon.mix+ }
-# end of warning.element
-warning.attlist &= common.attrib, admon.role.attrib, local.admon.attrib
-# end of warning.attlist
-
-# end of admon.module
-
-# ......................................................................
-
-# Lists ................................................................
-
-# GlossList ........................
-local.glosslist.attrib = empty
-glosslist.role.attrib = role.attrib
-# doc:A wrapper for a set of GlossEntrys.
-glosslist =
- element glosslist {
- glosslist.attlist,
- blockinfo?,
- formalobject.title.content?,
- glossentry+
- }
-# end of glosslist.element
-glosslist.attlist &=
- common.attrib, glosslist.role.attrib, local.glosslist.attrib
-# end of glosslist.attlist
-
-# end of glosslist.module
-local.glossentry.attrib = empty
-glossentry.role.attrib = role.attrib
-# doc:An entry in a Glossary or GlossList.
-glossentry =
- element glossentry {
- glossentry.attlist,
- glossterm,
- acronym?,
- abbrev?,
- ndxterm.class*,
- revhistory?,
- (glosssee | glossdef+)
- }
-# end of glossentry.element
-
-# SortAs: String by which the GlossEntry is to be sorted
-# (alphabetized) in lieu of its proper content
-glossentry.attlist &=
- attribute sortas { text }?,
- common.attrib,
- glossentry.role.attrib,
- local.glossentry.attrib
-# end of glossentry.attlist
-
-# end of glossentry.module
-
-# GlossTerm (defined in the Inlines section, below)
-local.glossdef.attrib = empty
-glossdef.role.attrib = role.attrib
-# doc:A definition in a GlossEntry.
-glossdef =
- element glossdef { glossdef.attlist, glossdef.mix+, glossseealso* }
-# end of glossdef.element
-
-# Subject: List of subjects; keywords for the definition
-glossdef.attlist &=
- attribute subject { text }?,
- common.attrib,
- glossdef.role.attrib,
- local.glossdef.attrib
-# end of glossdef.attlist
-
-# end of glossdef.module
-local.glosssee.attrib = empty
-glosssee.role.attrib = role.attrib
-# doc:A cross-reference from one GlossEntry to another.
-glosssee = element glosssee { glosssee.attlist, para.char.mix* }
-# end of glosssee.element
-
-# OtherTerm: Reference to the GlossEntry whose GlossTerm
-# should be displayed at the point of the GlossSee
-glosssee.attlist &=
- attribute otherterm { xsd:IDREF }?,
- common.attrib,
- glosssee.role.attrib,
- local.glosssee.attrib
-# end of glosssee.attlist
-
-# end of glosssee.module
-local.glossseealso.attrib = empty
-glossseealso.role.attrib = role.attrib
-# doc:A cross-reference from one GlossEntry to another.
-glossseealso =
- element glossseealso { glossseealso.attlist, para.char.mix* }
-# end of glossseealso.element
-
-# OtherTerm: Reference to the GlossEntry whose GlossTerm
-# should be displayed at the point of the GlossSeeAlso
-glossseealso.attlist &=
- attribute otherterm { xsd:IDREF }?,
- common.attrib,
- glossseealso.role.attrib,
- local.glossseealso.attrib
-# end of glossseealso.attlist
-
-# end of glossseealso.module
-
-# end of glossentry.content.module
-
-# ItemizedList and OrderedList .....
-local.itemizedlist.attrib = empty
-itemizedlist.role.attrib = role.attrib
-# doc:A list in which each entry is marked with a bullet or other dingbat.
-itemizedlist =
- element itemizedlist {
- itemizedlist.attlist,
- blockinfo?,
- formalobject.title.content?,
- listpreamble.mix*,
- listitem+
- }
-# end of itemizedlist.element
-
-# Spacing: Whether the vertical space in the list should be
-# compressed
-
-# Mark: Keyword, e.g., bullet, dash, checkbox, none;
-# list of keywords and defaults are implementation specific
-itemizedlist.attlist &=
- attribute spacing { "normal" | "compact" }?,
- mark.attrib,
- common.attrib,
- itemizedlist.role.attrib,
- local.itemizedlist.attrib
-# end of itemizedlist.attlist
-
-# end of itemizedlist.module
-local.orderedlist.attrib = empty
-orderedlist.role.attrib = role.attrib
-# doc:A list in which each entry is marked with a sequentially incremented label.
-orderedlist =
- element orderedlist {
- orderedlist.attlist,
- blockinfo?,
- formalobject.title.content?,
- listpreamble.mix*,
- listitem+
- }
-# end of orderedlist.element
-
-# Numeration: Style of ListItem numbered; default is expected
-# to be Arabic
-
-# InheritNum: Specifies for a nested list that the numbering
-# of ListItems should include the number of the item
-# within which they are nested (e.g., 1a and 1b within 1,
-# rather than a and b)
-
-# Continuation: Where list numbering begins afresh (Restarts,
-# the default) or continues that of the immediately preceding
-# list (Continues)
-
-# Spacing: Whether the vertical space in the list should be
-# compressed
-orderedlist.attlist &=
- attribute numeration {
- "arabic" | "upperalpha" | "loweralpha" |
"upperroman" | "lowerroman"
- }?,
- [ a:defaultValue = "ignore" ]
- attribute inheritnum { "inherit" | "ignore" }?,
- [ a:defaultValue = "restarts" ]
- attribute continuation { "continues" | "restarts" }?,
- attribute spacing { "normal" | "compact" }?,
- common.attrib,
- orderedlist.role.attrib,
- local.orderedlist.attrib
-# end of orderedlist.attlist
-
-# end of orderedlist.module
-local.listitem.attrib = empty
-listitem.role.attrib = role.attrib
-# doc:A wrapper for the elements of a list item.
-listitem = element listitem { listitem.attlist, component.mix+ }
-# end of listitem.element
-
-# Override: Indicates the mark to be used for this ListItem
-# instead of the default mark or the mark specified by
-# the Mark attribute on the enclosing ItemizedList
-listitem.attlist &=
- attribute override { text }?,
- common.attrib,
- listitem.role.attrib,
- local.listitem.attrib
-# end of listitem.attlist
-
-# end of listitem.module
-
-# SegmentedList ....................
-local.segmentedlist.attrib = empty
-segmentedlist.role.attrib = role.attrib
-# doc:A segmented list, a list of sets of elements.
-segmentedlist =
- element segmentedlist {
- segmentedlist.attlist,
- formalobject.title.content?,
- segtitle+,
- seglistitem+
- }
-# end of segmentedlist.element
-segmentedlist.attlist &=
- common.attrib, segmentedlist.role.attrib, local.segmentedlist.attrib
-# end of segmentedlist.attlist
-
-# end of segmentedlist.module
-local.segtitle.attrib = empty
-segtitle.role.attrib = role.attrib
-# doc:The title of an element of a list item in a segmented list.
-segtitle = element segtitle { segtitle.attlist, title.char.mix* }
-# end of segtitle.element
-segtitle.attlist &=
- common.attrib, segtitle.role.attrib, local.segtitle.attrib
-# end of segtitle.attlist
-
-# end of segtitle.module
-local.seglistitem.attrib = empty
-seglistitem.role.attrib = role.attrib
-# doc:A list item in a segmented list.
-seglistitem = element seglistitem { seglistitem.attlist, seg+ }
-# end of seglistitem.element
-seglistitem.attlist &=
- common.attrib, seglistitem.role.attrib, local.seglistitem.attrib
-# end of seglistitem.attlist
-
-# end of seglistitem.module
-local.seg.attrib = empty
-seg.role.attrib = role.attrib
-# doc:An element of a list item in a segmented list.
-seg = element seg { seg.attlist, para.char.mix* }
-# end of seg.element
-seg.attlist &= common.attrib, seg.role.attrib, local.seg.attrib
-# end of seg.attlist
-
-# end of seg.module
-
-# end of segmentedlist.content.module
-
-# SimpleList .......................
-local.simplelist.attrib = empty
-simplelist.role.attrib = role.attrib
-# doc:An undecorated list of single words or short phrases.
-simplelist = element simplelist { simplelist.attlist, member+ }
-# end of simplelist.element
-
-# Columns: The number of columns the array should contain
-
-# Type: How the Members of the SimpleList should be
-# formatted: Inline (members separated with commas etc.
-# inline), Vert (top to bottom in n Columns), or Horiz (in
-# the direction of text flow) in n Columns. If Column
-# is 1 or implied, Type=Vert and Type=Horiz give the same
-# results.
-simplelist.attlist &=
- attribute columns { text }?,
- [ a:defaultValue = "vert" ]
- attribute type { "inline" | "vert" | "horiz" }?,
- common.attrib,
- simplelist.role.attrib,
- local.simplelist.attrib
-# end of simplelist.attlist
-
-# end of simplelist.module
-local.member.attrib = empty
-member.role.attrib = role.attrib
-# doc:An element of a simple list.
-member = element member { member.attlist, para.char.mix* }
-# end of member.element
-member.attlist &= common.attrib, member.role.attrib, local.member.attrib
-# end of member.attlist
-
-# end of member.module
-
-# end of simplelist.content.module
-
-# VariableList .....................
-local.variablelist.attrib = empty
-variablelist.role.attrib = role.attrib
-# doc:A list in which each entry is composed of a set of one or more terms and an
associated description.
-variablelist =
- element variablelist {
- variablelist.attlist,
- blockinfo?,
- formalobject.title.content?,
- listpreamble.mix*,
- varlistentry+
- }
-# end of variablelist.element
-
-# TermLength: Length beyond which the presentation engine
-# may consider the Term too long and select an alternate
-# presentation of the Term and, or, its associated ListItem.
-variablelist.attlist &=
- attribute termlength { text }?,
- attribute spacing { "normal" | "compact" }?,
- common.attrib,
- variablelist.role.attrib,
- local.variablelist.attrib
-# end of variablelist.attlist
-
-# end of variablelist.module
-local.varlistentry.attrib = empty
-varlistentry.role.attrib = role.attrib
-# doc:A wrapper for a set of terms and the associated description in a variable list.
-varlistentry =
- element varlistentry { varlistentry.attlist, term+, listitem }
-# end of varlistentry.element
-varlistentry.attlist &=
- common.attrib, varlistentry.role.attrib, local.varlistentry.attrib
-# end of varlistentry.attlist
-
-# end of varlistentry.module
-local.term.attrib = empty
-term.role.attrib = role.attrib
-# doc:The word or phrase being defined or described in a variable list.
-term = element term { term.attlist, para.char.mix* }
-# end of term.element
-term.attlist &= common.attrib, term.role.attrib, local.term.attrib
-# end of term.attlist
-
-# end of term.module
-
-# ListItem (defined above)
-
-# end of variablelist.content.module
-
-# CalloutList ......................
-local.calloutlist.attrib = empty
-calloutlist.role.attrib = role.attrib
-# doc:A list of Callouts.
-calloutlist =
- element calloutlist {
- calloutlist.attlist, formalobject.title.content?, callout+
- }
-# end of calloutlist.element
-calloutlist.attlist &=
- common.attrib, calloutlist.role.attrib, local.calloutlist.attrib
-# end of calloutlist.attlist
-
-# end of calloutlist.module
-local.callout.attrib = empty
-callout.role.attrib = role.attrib
-# doc:A “called out” description of a marked Area.
-callout = element callout { callout.attlist, component.mix+ }
-# end of callout.element
-
-# AreaRefs: IDs of one or more Areas or AreaSets described
-# by this Callout
-callout.attlist &=
- attribute arearefs { xsd:IDREFS },
- common.attrib,
- callout.role.attrib,
- local.callout.attrib
-# end of callout.attlist
-
-# end of callout.module
-
-# end of calloutlist.content.module
-
-# ......................................................................
-
-# Objects ..............................................................
-
-# Examples etc. ....................
-local.example.attrib = empty
-example.role.attrib = role.attrib
-# doc:A formal example, with a title.
-example =
- element example {
- example.attlist,
- blockinfo?,
- formalobject.title.content,
- example.mix+
- }
-# end of example.element
-example.attlist &=
- attribute floatstyle { text }?,
- label.attrib,
- width.attrib,
- common.attrib,
- example.role.attrib,
- local.example.attrib
-# end of example.attlist
-
-# end of example.module
-local.informalexample.attrib = empty
-informalexample.role.attrib = role.attrib
-# doc:A displayed example without a title.
-informalexample =
- element informalexample {
- informalexample.attlist, blockinfo?, example.mix+
- }
-# end of informalexample.element
-informalexample.attlist &=
- attribute floatstyle { text }?,
- width.attrib,
- common.attrib,
- informalexample.role.attrib,
- local.informalexample.attrib
-# end of informalexample.attlist
-
-# end of informalexample.module
-local.programlistingco.attrib = empty
-programlistingco.role.attrib = role.attrib
-# doc:A program listing with associated areas used in callouts.
-programlistingco =
- element programlistingco {
- programlistingco.attlist, areaspec, programlisting, calloutlist*
- }
-# end of programlistingco.element
-programlistingco.attlist &=
- common.attrib,
- programlistingco.role.attrib,
- local.programlistingco.attrib
-# end of programlistingco.attlist
-
-# CalloutList (defined above in Lists)
-
-# end of informalexample.module
-local.areaspec.attrib = empty
-areaspec.role.attrib = role.attrib
-# doc:A collection of regions in a graphic or code example.
-areaspec = element areaspec { areaspec.attlist, (area | areaset)+ }
-# end of areaspec.element
-
-# Units: global unit of measure in which coordinates in
-# this spec are expressed:
-#
-# - CALSPair "x1,y1 x2,y2": lower-left and upper-right
-# coordinates in a rectangle describing repro area in which
-# graphic is placed, where X and Y dimensions are each some
-# number 0..10000 (taken from CALS graphic attributes)
-#
-# - LineColumn "line column": line number and column number
-# at which to start callout text in "linespecific" content
-#
-# - LineRange "startline endline": whole lines from startline
-# to endline in "linespecific" content
-#
-# - LineColumnPair "line1 col1 line2 col2": starting and ending
-# points of area in "linespecific" content that starts at
-# first position and ends at second position (including the
-# beginnings of any intervening lines)
-#
-# - Other: directive to look at value of OtherUnits attribute
-# to get implementation-specific keyword
-#
-# The default is implementation-specific; usually dependent on
-# the parent element (GraphicCO gets CALSPair, ProgramListingCO
-# and ScreenCO get LineColumn)
-
-# OtherUnits: User-defined units
-areaspec.attlist &=
- attribute units {
- "calspair" | "linecolumn" | "linerange" |
"linecolumnpair" | "other"
- }?,
- attribute otherunits { xsd:NMTOKEN }?,
- common.attrib,
- areaspec.role.attrib,
- local.areaspec.attrib
-# end of areaspec.attlist
-
-# end of areaspec.module
-local.area.attrib = empty
-area.role.attrib = role.attrib
-# doc:A region defined for a Callout in a graphic or code example.
-area = element area { area.attlist, empty }
-# end of area.element
-
-# bug number/symbol override or initialization
-
-# to any related information
-
-# Units: unit of measure in which coordinates in this
-# area are expressed; inherits from AreaSet and AreaSpec
-
-# OtherUnits: User-defined units
-area.attlist &=
- label.attrib,
- linkends.attrib,
- attribute units {
- "calspair" | "linecolumn" | "linerange" |
"linecolumnpair" | "other"
- }?,
- attribute otherunits { xsd:NMTOKEN }?,
- attribute coords { text },
- idreq.common.attrib,
- area.role.attrib,
- local.area.attrib
-# end of area.attlist
-
-# end of area.module
-local.areaset.attrib = empty
-areaset.role.attrib = role.attrib
-# doc:A set of related areas in a graphic or code example.
-areaset = element areaset { areaset.attlist, area+ }
-# end of areaset.element
-
-# bug number/symbol override or initialization
-
-# Units: unit of measure in which coordinates in this
-# area are expressed; inherits from AreaSpec
-areaset.attlist &=
- label.attrib,
- attribute units {
- "calspair" | "linecolumn" | "linerange" |
"linecolumnpair" | "other"
- }?,
- attribute otherunits { xsd:NMTOKEN }?,
- attribute coords { text },
- idreq.common.attrib,
- areaset.role.attrib,
- local.areaset.attrib
-# end of areaset.attlist
-
-# end of areaset.module
-
-# end of areaspec.content.module
-local.programlisting.attrib = empty
-programlisting.role.attrib = role.attrib
-# doc:A literal listing of all or part of a program.
-programlisting =
- element programlisting {
- programlisting.attlist,
- (para.char.mix | co | coref | lineannotation | textobject)*
- }
-# end of programlisting.element
-programlisting.attlist &=
- width.attrib,
- linespecific.attrib,
- common.attrib,
- programlisting.role.attrib,
- local.programlisting.attrib
-# end of programlisting.attlist
-
-# end of programlisting.module
-local.literallayout.attrib = empty
-literallayout.role.attrib = role.attrib
-# doc:A block of text in which line breaks and white space are to be reproduced
faithfully.
-literallayout =
- element literallayout {
- literallayout.attlist,
- (para.char.mix | co | coref | textobject | lineannotation)*
- }
-# end of literallayout.element
-literallayout.attlist &=
- width.attrib,
- linespecific.attrib,
- [ a:defaultValue = "normal" ]
- attribute class { "monospaced" | "normal" }?,
- common.attrib,
- literallayout.role.attrib,
- local.literallayout.attrib
-# end of literallayout.attlist
-
-# LineAnnotation (defined in the Inlines section, below)
-
-# end of literallayout.module
-local.screenco.attrib = empty
-screenco.role.attrib = role.attrib
-# doc:A screen with associated areas used in callouts.
-screenco =
- element screenco { screenco.attlist, areaspec, screen, calloutlist* }
-# end of screenco.element
-screenco.attlist &=
- common.attrib, screenco.role.attrib, local.screenco.attrib
-# end of screenco.attlist
-
-# AreaSpec (defined above)
-
-# CalloutList (defined above in Lists)
-
-# end of screenco.module
-local.screen.attrib = empty
-screen.role.attrib = role.attrib
-# doc:Text that a user sees or might see on a computer screen.
-screen =
- element screen {
- screen.attlist,
- (para.char.mix | co | coref | textobject | lineannotation)*
- }
-# end of screen.element
-screen.attlist &=
- width.attrib,
- linespecific.attrib,
- common.attrib,
- screen.role.attrib,
- local.screen.attrib
-# end of screen.attlist
-
-# end of screen.module
-local.screenshot.attrib = empty
-screenshot.role.attrib = role.attrib
-# doc:A representation of what the user sees or might see on a computer screen.
-screenshot =
- element screenshot {
- screenshot.attlist,
- screeninfo?,
- (graphic | graphicco | mediaobject | mediaobjectco)
- }
-# end of screenshot.element
-screenshot.attlist &=
- common.attrib, screenshot.role.attrib, local.screenshot.attrib
-# end of screenshot.attlist
-
-# end of screenshot.module
-local.screeninfo.attrib = empty
-screeninfo.role.attrib = role.attrib
-# doc:Information about how a screen shot was produced.
-screeninfo = element screeninfo { screeninfo.attlist, para.char.mix* }
-# end of screeninfo.element
-screeninfo.attlist &=
- common.attrib, screeninfo.role.attrib, local.screeninfo.attrib
-# end of screeninfo.attlist
-
-# end of screeninfo.module
-
-# end of screenshot.content.module
-
-# Figures etc. .....................
-local.figure.attrib = empty
-figure.role.attrib = role.attrib
-# doc:A formal figure, generally an illustration, with a title.
-figure =
- element figure {
- figure.attlist,
- blockinfo?,
- formalobject.title.content,
- (figure.mix | link.char.class)+
- }
-# end of figure.element
-
-# Float: Whether the Figure is supposed to be rendered
-# where convenient (yes (1) value) or at the place it occurs
-# in the text (no (0) value, the default)
-figure.attlist &=
- [ a:defaultValue = "0" ] attribute float { yesorno.attvals }?,
- attribute floatstyle { text }?,
- attribute pgwide { yesorno.attvals }?,
- label.attrib,
- common.attrib,
- figure.role.attrib,
- local.figure.attrib
-# end of figure.attlist
-
-# end of figure.module
-local.informalfigure.attrib = empty
-informalfigure.role.attrib = role.attrib
-# doc:A untitled figure.
-informalfigure =
- element informalfigure {
- informalfigure.attlist, blockinfo?, (figure.mix | link.char.class)+
- }
-# end of informalfigure.element
-
-# Float: Whether the Figure is supposed to be rendered
-# where convenient (yes (1) value) or at the place it occurs
-# in the text (no (0) value, the default)
-informalfigure.attlist &=
- [ a:defaultValue = "0" ] attribute float { yesorno.attvals }?,
- attribute floatstyle { text }?,
- attribute pgwide { yesorno.attvals }?,
- label.attrib,
- common.attrib,
- informalfigure.role.attrib,
- local.informalfigure.attrib
-# end of informalfigure.attlist
-
-# end of informalfigure.module
-local.graphicco.attrib = empty
-graphicco.role.attrib = role.attrib
-# doc:A graphic that contains callout areas.
-graphicco =
- element graphicco {
- graphicco.attlist, areaspec, graphic, calloutlist*
- }
-# end of graphicco.element
-graphicco.attlist &=
- common.attrib, graphicco.role.attrib, local.graphicco.attrib
-# end of graphicco.attlist
-
-# AreaSpec (defined above in Examples)
-
-# CalloutList (defined above in Lists)
-
-# end of graphicco.module
-
-# Graphical data can be the content of Graphic, or you can reference
-# an external file either as an entity (Entitref) or a filename
-# (Fileref).
-local.graphic.attrib = empty
-graphic.role.attrib = role.attrib
-# doc:A displayed graphical object (not an inline).
-graphic = element graphic { graphic.attlist, empty }
-# end of graphic.element
-graphic.attlist &=
- graphics.attrib,
- common.attrib,
- graphic.role.attrib,
- local.graphic.attrib
-# end of graphic.attlist
-
-# end of graphic.module
-local.inlinegraphic.attrib = empty
-inlinegraphic.role.attrib = role.attrib
-# doc:An object containing or pointing to graphical data that will be rendered inline.
-inlinegraphic = element inlinegraphic { inlinegraphic.attlist, empty }
-# end of inlinegraphic.element
-inlinegraphic.attlist &=
- graphics.attrib,
- common.attrib,
- inlinegraphic.role.attrib,
- local.inlinegraphic.attrib
-# end of inlinegraphic.attlist
-
-# end of inlinegraphic.module
-local.mediaobject.attrib = empty
-mediaobject.role.attrib = role.attrib
-# doc:A displayed media object (video, audio, image, etc.).
-mediaobject =
- element mediaobject {
- mediaobject.attlist, objectinfo?, mediaobject.mix+, caption?
- }
-# end of mediaobject.element
-mediaobject.attlist &=
- common.attrib, mediaobject.role.attrib, local.mediaobject.attrib
-# end of mediaobject.attlist
-
-# end of mediaobject.module
-local.inlinemediaobject.attrib = empty
-inlinemediaobject.role.attrib = role.attrib
-# doc:An inline media object (video, audio, image, and so on).
-inlinemediaobject =
- element inlinemediaobject {
- inlinemediaobject.attlist, objectinfo?, mediaobject.mix+
- }
-# end of inlinemediaobject.element
-inlinemediaobject.attlist &=
- common.attrib,
- inlinemediaobject.role.attrib,
- local.inlinemediaobject.attrib
-# end of inlinemediaobject.attlist
-
-# end of inlinemediaobject.module
-local.videoobject.attrib = empty
-videoobject.role.attrib = role.attrib
-# doc:A wrapper for video data and its associated meta-information.
-videoobject =
- element videoobject { videoobject.attlist, objectinfo?, videodata }
-# end of videoobject.element
-videoobject.attlist &=
- common.attrib, videoobject.role.attrib, local.videoobject.attrib
-# end of videoobject.attlist
-
-# end of videoobject.module
-local.audioobject.attrib = empty
-audioobject.role.attrib = role.attrib
-# doc:A wrapper for audio data and its associated meta-information.
-audioobject =
- element audioobject { audioobject.attlist, objectinfo?, audiodata }
-# end of audioobject.element
-audioobject.attlist &=
- common.attrib, audioobject.role.attrib, local.audioobject.attrib
-# end of audioobject.attlist
-
-# end of audioobject.module
-local.imageobject.attrib = empty
-imageobject.role.attrib = role.attrib
-# doc:A wrapper for image data and its associated meta-information.
-imageobject =
- element imageobject { imageobject.attlist, objectinfo?, imagedata }
-# end of imageobject.element
-imageobject.attlist &=
- common.attrib, imageobject.role.attrib, local.imageobject.attrib
-# end of imageobject.attlist
-
-# end of imageobject.module
-local.textobject.attrib = empty
-textobject.role.attrib = role.attrib
-# doc:A wrapper for a text description of an object and its associated meta-information.
-textobject =
- element textobject {
- textobject.attlist,
- objectinfo?,
- (phrase | textdata | textobject.mix+)
- }
-# end of textobject.element
-textobject.attlist &=
- common.attrib, textobject.role.attrib, local.textobject.attrib
-# end of textobject.attlist
-
-# end of textobject.module
-local.objectinfo.attrib = empty
-objectinfo.role.attrib = role.attrib
-# doc:Meta-information for an object.
-objectinfo = element objectinfo { objectinfo.attlist, info.class+ }
-# end of objectinfo.element
-objectinfo.attlist &=
- common.attrib, objectinfo.role.attrib, local.objectinfo.attrib
-# end of objectinfo.attlist
-
-# end of objectinfo.module
-
-# EntityRef: Name of an external entity containing the content
-# of the object data
-
-# FileRef: Filename, qualified by a pathname if desired,
-# designating the file containing the content of the object data
-
-# Format: Notation of the element content, if any
-
-# SrcCredit: Information about the source of the image
-local.objectdata.attrib = empty
-objectdata.attrib =
- attribute entityref { xsd:ENTITY }?,
- attribute fileref { text }?,
- attribute format { notation.class }?,
- attribute srccredit { text }?,
- local.objectdata.attrib
-local.videodata.attrib = empty
-videodata.role.attrib = role.attrib
-# doc:Pointer to external video data.
-videodata = element videodata { videodata.attlist, empty }
-# end of videodata.element
-
-# Width: Same as CALS reprowid (desired width)
-
-# Depth: Same as CALS reprodep (desired depth)
-
-# Align: Same as CALS hplace with 'none' removed; #IMPLIED means
-# application-specific
-
-# Scale: Conflation of CALS hscale and vscale
-
-# Scalefit: Same as CALS scalefit
-videodata.attlist &=
- attribute width { text }?,
- attribute contentwidth { text }?,
- attribute depth { text }?,
- attribute contentdepth { text }?,
- attribute align { "left" | "right" | "center" }?,
- attribute valign { "top" | "middle" | "bottom" }?,
- attribute scale { text }?,
- attribute scalefit { yesorno.attvals }?,
- objectdata.attrib,
- common.attrib,
- videodata.role.attrib,
- local.videodata.attrib
-# end of videodata.attlist
-
-# end of videodata.module
-local.audiodata.attrib = empty
-audiodata.role.attrib = role.attrib
-# doc:Pointer to external audio data.
-audiodata = element audiodata { audiodata.attlist, empty }
-# end of audiodata.element
-audiodata.attlist &=
- objectdata.attrib,
- common.attrib,
- audiodata.role.attrib,
- local.audiodata.attrib
-# end of audiodata.attlist
-
-# end of audiodata.module
-local.imagedata.attrib = empty
-imagedata.role.attrib = role.attrib
-# doc:Pointer to external image data.
-imagedata = element imagedata { imagedata.attlist, empty }
-# end of imagedata.element
-
-# Width: Same as CALS reprowid (desired width)
-
-# Depth: Same as CALS reprodep (desired depth)
-
-# Align: Same as CALS hplace with 'none' removed; #IMPLIED means
-# application-specific
-
-# Scale: Conflation of CALS hscale and vscale
-
-# Scalefit: Same as CALS scalefit
-imagedata.attlist &=
- attribute width { text }?,
- attribute contentwidth { text }?,
- attribute depth { text }?,
- attribute contentdepth { text }?,
- attribute align { "left" | "right" | "center" }?,
- attribute valign { "top" | "middle" | "bottom" }?,
- attribute scale { text }?,
- attribute scalefit { yesorno.attvals }?,
- objectdata.attrib,
- common.attrib,
- imagedata.role.attrib,
- local.imagedata.attrib
-# end of imagedata.attlist
-
-# end of imagedata.module
-local.textdata.attrib = empty
-textdata.role.attrib = role.attrib
-# doc:Pointer to external text data.
-textdata = element textdata { textdata.attlist, empty }
-# end of textdata.element
-textdata.attlist &=
- attribute encoding { text }?,
- objectdata.attrib,
- common.attrib,
- textdata.role.attrib,
- local.textdata.attrib
-# end of textdata.attlist
-
-# end of textdata.module
-local.mediaobjectco.attrib = empty
-mediaobjectco.role.attrib = role.attrib
-# doc:A media object that contains callouts.
-mediaobjectco =
- element mediaobjectco {
- mediaobjectco.attlist,
- objectinfo?,
- imageobjectco,
- (imageobjectco | textobject)*
- }
-# end of mediaobjectco.element
-mediaobjectco.attlist &=
- common.attrib, mediaobjectco.role.attrib, local.mediaobjectco.attrib
-# end of mediaobjectco.attlist
-
-# end of mediaobjectco.module
-local.imageobjectco.attrib = empty
-imageobjectco.role.attrib = role.attrib
-# doc:A wrapper for an image object with callouts.
-imageobjectco =
- element imageobjectco {
- imageobjectco.attlist, areaspec, imageobject, calloutlist*
- }
-# end of imageobjectco.element
-imageobjectco.attlist &=
- common.attrib, imageobjectco.role.attrib, local.imageobjectco.attrib
-# end of imageobjectco.attlist
-
-# end of imageobjectco.module
-
-# end of mediaobject.content.module
-
-# Equations ........................
-
-# This PE provides a mechanism for replacing equation content,
-
-# perhaps adding a new or different model (e.g., MathML)
-equation.content = alt?, (graphic+ | mediaobject+ | mathphrase+)
-inlineequation.content =
- alt?, (graphic+ | inlinemediaobject+ | mathphrase+)
-local.equation.attrib = empty
-equation.role.attrib = role.attrib
-# doc:A displayed mathematical equation.
-equation =
- element equation {
- equation.attlist,
- blockinfo?,
- formalobject.title.content?,
- (informalequation | equation.content)
- }
-# end of equation.element
-equation.attlist &=
- attribute floatstyle { text }?,
- label.attrib,
- common.attrib,
- equation.role.attrib,
- local.equation.attrib
-# end of equation.attlist
-
-# end of equation.module
-local.informalequation.attrib = empty
-informalequation.role.attrib = role.attrib
-# doc:A displayed mathematical equation without a title.
-informalequation =
- element informalequation {
- informalequation.attlist, blockinfo?, equation.content
- }
-# end of informalequation.element
-informalequation.attlist &=
- attribute floatstyle { text }?,
- common.attrib,
- informalequation.role.attrib,
- local.informalequation.attrib
-# end of informalequation.attlist
-
-# end of informalequation.module
-local.inlineequation.attrib = empty
-inlineequation.role.attrib = role.attrib
-# doc:A mathematical equation or expression occurring inline.
-inlineequation =
- element inlineequation {
- inlineequation.attlist, inlineequation.content
- }
-# end of inlineequation.element
-inlineequation.attlist &=
- common.attrib, inlineequation.role.attrib, local.inlineequation.attrib
-# end of inlineequation.attlist
-
-# end of inlineequation.module
-local.alt.attrib = empty
-alt.role.attrib = role.attrib
-# doc:Text representation for a graphical element.
-alt = element alt { alt.attlist, text }
-# end of alt.element
-alt.attlist &= common.attrib, alt.role.attrib, local.alt.attrib
-# end of alt.attlist
-
-# end of alt.module
-local.mathphrase.attrib = empty
-mathphrase.role.attrib = role.attrib
-# doc:A mathematical phrase, an expression that can be represented with ordinary text and
a small amount of markup.
-mathphrase =
- element mathphrase {
- mathphrase.attlist, (text | subscript | superscript | emphasis)*
- }
-# end of mathphrase.element
-mathphrase.attlist &=
- common.attrib, mathphrase.role.attrib, local.mathphrase.attrib
-# end of mathphrase.attlist
-
-# end of mathphrase.module
-
-# Tables ...........................
-
-# Choose a table model. CALS or OASIS XML Exchange
-
-# Do we allow the HTML table model as well?
-
-# ======================================================
-
-# xhtmltbl.mod defines HTML tables and sets parameter
-# entities so that, when the CALS table module is read,
-# we end up allowing any table to be CALS or HTML.
-# i.e. This include must come first!
-
-# ======================================================
-include "htmltblx.rnc"
-# end of allow.html.tables
-
-# Add label and role attributes to table and informaltable
-
-# Add common attributes to Table, TGroup, TBody, THead, TFoot, Row,
-# EntryTbl, and Entry (and InformalTable element).
-
-# Content model for Table.
-
-# Allow either objects or inlines; beware of REs between elements.
-
-# Reference CALS Table Model
-include "calstblx.rnc"
-# end of table.module
-
-# Note that InformalTable is dependent on some of the entity
-# declarations that customize Table.
-local.informaltable.attrib = empty
-# the following entity may have been declared by the XHTML table module
-
-# doc:A table without a title.
-informaltable =
- element informaltable {
- informaltable.attlist, blockinfo?, informal.tbl.table.mdl
- }
-# end of informaltable.element
-
-# Frame, Colsep, and Rowsep must be repeated because
-# they are not in entities in the table module.
-
-# includes TabStyle, ToCentry, ShortEntry,
-# Orient, PgWide
-
-# includes Label
-
-# includes common attributes
-informaltable.attlist &=
- attribute frame { tbl.frame.attval }?,
- attribute colsep { yesorno.attvals }?,
- attribute rowsep { yesorno.attvals }?,
- common.table.attribs,
- tbl.table.att,
- local.informaltable.attrib
-# end of informaltable.attlist
-
-# end of informaltable.module
-local.caption.attrib = empty
-caption.role.attrib = role.attrib
-# doc:A caption.
-caption = element caption { caption.attlist, (text | textobject.mix)* }
-# end of caption.element
-
-# attrs comes from HTML tables ...
-
-# common.attrib, but without ID because ID is in attrs
-caption.attlist.content =
- caption.role.attrib,
- attrs,
- attribute align { "top" | "bottom" | "left" |
"right" }?,
- local.caption.attrib
-caption.attlist &= caption.attlist.content
-# end of caption.attlist
-
-# end of caption.module
-
-# ......................................................................
-
-# Synopses .............................................................
-
-# Synopsis .........................
-local.synopsis.attrib = empty
-synopsis.role.attrib = role.attrib
-# doc:A general-purpose element for representing the syntax of commands or functions.
-synopsis =
- element synopsis {
- synopsis.attlist,
- (para.char.mix
- | graphic
- | mediaobject
- | co
- | coref
- | textobject
- | lineannotation)*
- }
-# end of synopsis.element
-synopsis.attlist &=
- label.attrib,
- linespecific.attrib,
- common.attrib,
- synopsis.role.attrib,
- local.synopsis.attrib
-# end of synopsis.attlist
-
-# LineAnnotation (defined in the Inlines section, below)
-
-# end of synopsis.module
-
-# CmdSynopsis ......................
-local.cmdsynopsis.attrib = empty
-cmdsynopsis.role.attrib = role.attrib
-# doc:A syntax summary for a software command.
-cmdsynopsis =
- element cmdsynopsis {
- cmdsynopsis.attlist, (command | arg | group | sbr)+, synopfragment*
- }
-# end of cmdsynopsis.element
-
-# Sepchar: Character that should separate command and all
-# top-level arguments; alternate value might be e.g., Δ
-cmdsynopsis.attlist &=
- label.attrib,
- [ a:defaultValue = " " ] attribute sepchar { text }?,
- attribute cmdlength { text }?,
- common.attrib,
- cmdsynopsis.role.attrib,
- local.cmdsynopsis.attrib
-# end of cmdsynopsis.attlist
-
-# end of cmdsynopsis.module
-local.arg.attrib = empty
-arg.role.attrib = role.attrib
-# doc:An argument in a CmdSynopsis.
-arg =
- element arg {
- arg.attlist,
- (text
- | arg
- | group
- | option
- | synopfragmentref
- | replaceable
- | sbr)*
- }
-# end of arg.element
-
-# Choice: Whether Arg must be supplied: Opt (optional to
-# supply, e.g. [arg]; the default), Req (required to supply,
-# e.g. {arg}), or Plain (required to supply, e.g. arg)
-
-# Rep: whether Arg is repeatable: Norepeat (e.g. arg without
-# ellipsis; the default), or Repeat (e.g. arg...)
-arg.attlist &=
- [ a:defaultValue = "opt" ]
- attribute choice { "opt" | "req" | "plain" }?,
- [ a:defaultValue = "norepeat" ]
- attribute rep { "norepeat" | "repeat" }?,
- common.attrib,
- arg.role.attrib,
- local.arg.attrib
-# end of arg.attlist
-
-# end of arg.module
-local.group.attrib = empty
-group.role.attrib = role.attrib
-# doc:A group of elements in a CmdSynopsis.
-group =
- element group {
- group.attlist,
- (arg | group | option | synopfragmentref | replaceable | sbr)+
- }
-# end of group.element
-
-# Choice: Whether Group must be supplied: Opt (optional to
-# supply, e.g. [g1|g2|g3]; the default), Req (required to
-# supply, e.g. {g1|g2|g3}), Plain (required to supply,
-# e.g. g1|g2|g3), OptMult (can supply zero or more, e.g.
-# [[g1|g2|g3]]), or ReqMult (must supply one or more, e.g.
-# {{g1|g2|g3}})
-
-# Rep: whether Group is repeatable: Norepeat (e.g. group
-# without ellipsis; the default), or Repeat (e.g. group...)
-group.attlist &=
- [ a:defaultValue = "opt" ]
- attribute choice { "opt" | "req" | "plain" }?,
- [ a:defaultValue = "norepeat" ]
- attribute rep { "norepeat" | "repeat" }?,
- common.attrib,
- group.role.attrib,
- local.group.attrib
-# end of group.attlist
-
-# end of group.module
-local.sbr.attrib = empty
-# Synopsis break
-sbr.role.attrib = role.attrib
-# doc:An explicit line break in a command synopsis.
-sbr = element sbr { sbr.attlist, empty }
-# end of sbr.element
-sbr.attlist &= common.attrib, sbr.role.attrib, local.sbr.attrib
-# end of sbr.attlist
-
-# end of sbr.module
-local.synopfragmentref.attrib = empty
-synopfragmentref.role.attrib = role.attrib
-# doc:A reference to a fragment of a command synopsis.
-synopfragmentref =
- element synopfragmentref { synopfragmentref.attlist, text }
-# end of synopfragmentref.element
-
-# to SynopFragment of complex synopsis
-# material for separate referencing
-synopfragmentref.attlist &=
- linkendreq.attrib,
- common.attrib,
- synopfragmentref.role.attrib,
- local.synopfragmentref.attrib
-# end of synopfragmentref.attlist
-
-# end of synopfragmentref.module
-local.synopfragment.attrib = empty
-synopfragment.role.attrib = role.attrib
-# doc:A portion of a CmdSynopsis broken out from the main body of the synopsis.
-synopfragment =
- element synopfragment { synopfragment.attlist, (arg | group)+ }
-# end of synopfragment.element
-synopfragment.attlist &=
- idreq.common.attrib,
- synopfragment.role.attrib,
- local.synopfragment.attrib
-# end of synopfragment.attlist
-
-# end of synopfragment.module
-
-# Command (defined in the Inlines section, below)
-
-# Option (defined in the Inlines section, below)
-
-# Replaceable (defined in the Inlines section, below)
-
-# end of cmdsynopsis.content.module
-
-# FuncSynopsis .....................
-local.funcsynopsis.attrib = empty
-funcsynopsis.role.attrib = role.attrib
-# doc:The syntax summary for a function definition.
-funcsynopsis =
- element funcsynopsis {
- funcsynopsis.attlist, (funcsynopsisinfo | funcprototype)+
- }
-# end of funcsynopsis.element
-funcsynopsis.attlist &=
- label.attrib,
- common.attrib,
- funcsynopsis.role.attrib,
- local.funcsynopsis.attrib
-# end of funcsynopsis.attlist
-
-# end of funcsynopsis.module
-local.funcsynopsisinfo.attrib = empty
-funcsynopsisinfo.role.attrib = role.attrib
-# doc:Information supplementing the FuncDefs of a FuncSynopsis.
-funcsynopsisinfo =
- element funcsynopsisinfo {
- funcsynopsisinfo.attlist,
- (cptr.char.mix | textobject | lineannotation)*
- }
-# end of funcsynopsisinfo.element
-funcsynopsisinfo.attlist &=
- linespecific.attrib,
- common.attrib,
- funcsynopsisinfo.role.attrib,
- local.funcsynopsisinfo.attrib
-# end of funcsynopsisinfo.attlist
-
-# end of funcsynopsisinfo.module
-local.funcprototype.attrib = empty
-funcprototype.role.attrib = role.attrib
-# doc:The prototype of a function.
-funcprototype =
- element funcprototype {
- funcprototype.attlist,
- modifier*,
- funcdef,
- (void | varargs | (paramdef+, varargs?)),
- modifier*
- }
-# end of funcprototype.element
-funcprototype.attlist &=
- common.attrib, funcprototype.role.attrib, local.funcprototype.attrib
-# end of funcprototype.attlist
-
-# end of funcprototype.module
-local.funcdef.attrib = empty
-funcdef.role.attrib = role.attrib
-# doc:A function (subroutine) name and its return type.
-funcdef =
- element funcdef {
- funcdef.attlist, (text | type | replaceable | function)*
- }
-# end of funcdef.element
-funcdef.attlist &=
- common.attrib, funcdef.role.attrib, local.funcdef.attrib
-# end of funcdef.attlist
-
-# end of funcdef.module
-local.void.attrib = empty
-void.role.attrib = role.attrib
-# doc:An empty element in a function synopsis indicating that the function in question
takes no arguments.
-void = element void { void.attlist, empty }
-# end of void.element
-void.attlist &= common.attrib, void.role.attrib, local.void.attrib
-# end of void.attlist
-
-# end of void.module
-local.varargs.attrib = empty
-varargs.role.attrib = role.attrib
-# doc:An empty element in a function synopsis indicating a variable number of arguments.
-varargs = element varargs { varargs.attlist, empty }
-# end of varargs.element
-varargs.attlist &=
- common.attrib, varargs.role.attrib, local.varargs.attrib
-# end of varargs.attlist
-
-# end of varargs.module
-
-# Processing assumes that only one Parameter will appear in a
-# ParamDef, and that FuncParams will be used at most once, for
-# providing information on the "inner parameters" for parameters that
-# are pointers to functions.
-local.paramdef.attrib = empty
-paramdef.role.attrib = role.attrib
-# doc:Information about a function parameter in a programming language.
-paramdef =
- element paramdef {
- paramdef.attlist,
- (text | initializer | type | replaceable | parameter | funcparams)*
- }
-# end of paramdef.element
-paramdef.attlist &=
- attribute choice { "opt" | "req" }?,
- common.attrib,
- paramdef.role.attrib,
- local.paramdef.attrib
-# end of paramdef.attlist
-
-# end of paramdef.module
-local.funcparams.attrib = empty
-funcparams.role.attrib = role.attrib
-# doc:Parameters for a function referenced through a function pointer in a synopsis.
-funcparams = element funcparams { funcparams.attlist, cptr.char.mix* }
-# end of funcparams.element
-funcparams.attlist &=
- common.attrib, funcparams.role.attrib, local.funcparams.attrib
-# end of funcparams.attlist
-
-# end of funcparams.module
-
-# LineAnnotation (defined in the Inlines section, below)
-
-# Replaceable (defined in the Inlines section, below)
-
-# Function (defined in the Inlines section, below)
-
-# Parameter (defined in the Inlines section, below)
-
-# end of funcsynopsis.content.module
-
-# ClassSynopsis .....................
-local.classsynopsis.attrib = empty
-classsynopsis.role.attrib = role.attrib
-# doc:The syntax summary for a class definition.
-classsynopsis =
- element classsynopsis {
- classsynopsis.attlist,
- (ooclass | oointerface | ooexception)+,
- (classsynopsisinfo | fieldsynopsis | method.synop.class)*
- }
-# end of classsynopsis.element
-classsynopsis.attlist &=
- attribute language { text }?,
- [ a:defaultValue = "class" ]
- attribute class { "class" | "interface" }?,
- common.attrib,
- classsynopsis.role.attrib,
- local.classsynopsis.attrib
-# end of classsynopsis.attlist
-
-# end of classsynopsis.module
-local.classsynopsisinfo.attrib = empty
-classsynopsisinfo.role.attrib = role.attrib
-# doc:Information supplementing the contents of a ClassSynopsis.
-classsynopsisinfo =
- element classsynopsisinfo {
- classsynopsisinfo.attlist,
- (cptr.char.mix | textobject | lineannotation)*
- }
-# end of classsynopsisinfo.element
-classsynopsisinfo.attlist &=
- linespecific.attrib,
- common.attrib,
- classsynopsisinfo.role.attrib,
- local.classsynopsisinfo.attrib
-# end of classsynopsisinfo.attlist
-
-# end of classsynopsisinfo.module
-local.ooclass.attrib = empty
-ooclass.role.attrib = role.attrib
-# doc:A class in an object-oriented programming language.
-ooclass =
- element ooclass { ooclass.attlist, (modifier | package)*, classname }
-# end of ooclass.element
-ooclass.attlist &=
- common.attrib, ooclass.role.attrib, local.ooclass.attrib
-# end of ooclass.attlist
-
-# end of ooclass.module
-local.oointerface.attrib = empty
-oointerface.role.attrib = role.attrib
-# doc:An interface in an object-oriented programming language.
-oointerface =
- element oointerface {
- oointerface.attlist, (modifier | package)*, interfacename
- }
-# end of oointerface.element
-oointerface.attlist &=
- common.attrib, oointerface.role.attrib, local.oointerface.attrib
-# end of oointerface.attlist
-
-# end of oointerface.module
-local.ooexception.attrib = empty
-ooexception.role.attrib = role.attrib
-# doc:An exception in an object-oriented programming language.
-ooexception =
- element ooexception {
- ooexception.attlist, (modifier | package)*, exceptionname
- }
-# end of ooexception.element
-ooexception.attlist &=
- common.attrib, ooexception.role.attrib, local.ooexception.attrib
-# end of ooexception.attlist
-
-# end of ooexception.module
-local.modifier.attrib = empty
-modifier.role.attrib = role.attrib
-# doc:Modifiers in a synopsis.
-modifier = element modifier { modifier.attlist, smallcptr.char.mix* }
-# end of modifier.element
-modifier.attlist &=
- common.attrib, modifier.role.attrib, local.modifier.attrib
-# end of modifier.attlist
-
-# end of modifier.module
-local.interfacename.attrib = empty
-interfacename.role.attrib = role.attrib
-# doc:The name of an interface.
-interfacename =
- element interfacename { interfacename.attlist, cptr.char.mix* }
-# end of interfacename.element
-interfacename.attlist &=
- common.attrib, interfacename.role.attrib, local.interfacename.attrib
-# end of interfacename.attlist
-
-# end of interfacename.module
-local.exceptionname.attrib = empty
-exceptionname.role.attrib = role.attrib
-# doc:The name of an exception.
-exceptionname =
- element exceptionname { exceptionname.attlist, smallcptr.char.mix* }
-# end of exceptionname.element
-exceptionname.attlist &=
- common.attrib, exceptionname.role.attrib, local.exceptionname.attrib
-# end of exceptionname.attlist
-
-# end of exceptionname.module
-local.fieldsynopsis.attrib = empty
-fieldsynopsis.role.attrib = role.attrib
-# doc:The name of a field in a class definition.
-fieldsynopsis =
- element fieldsynopsis {
- fieldsynopsis.attlist, modifier*, type?, varname, initializer?
- }
-# end of fieldsynopsis.element
-fieldsynopsis.attlist &=
- attribute language { text }?,
- common.attrib,
- fieldsynopsis.role.attrib,
- local.fieldsynopsis.attrib
-# end of fieldsynopsis.attlist
-
-# end of fieldsynopsis.module
-local.initializer.attrib = empty
-initializer.role.attrib = role.attrib
-# doc:The initializer for a FieldSynopsis.
-initializer =
- element initializer { initializer.attlist, smallcptr.char.mix* }
-# end of initializer.element
-initializer.attlist &=
- common.attrib, initializer.role.attrib, local.initializer.attrib
-# end of initializer.attlist
-
-# end of initializer.module
-local.constructorsynopsis.attrib = empty
-constructorsynopsis.role.attrib = role.attrib
-# doc:A syntax summary for a constructor.
-constructorsynopsis =
- element constructorsynopsis {
- constructorsynopsis.attlist,
- modifier*,
- methodname?,
- (methodparam+ | void?),
- exceptionname*
- }
-# end of constructorsynopsis.element
-constructorsynopsis.attlist &=
- attribute language { text }?,
- common.attrib,
- constructorsynopsis.role.attrib,
- local.constructorsynopsis.attrib
-# end of constructorsynopsis.attlist
-
-# end of constructorsynopsis.module
-local.destructorsynopsis.attrib = empty
-destructorsynopsis.role.attrib = role.attrib
-# doc:A syntax summary for a destructor.
-destructorsynopsis =
- element destructorsynopsis {
- destructorsynopsis.attlist,
- modifier*,
- methodname?,
- (methodparam+ | void?),
- exceptionname*
- }
-# end of destructorsynopsis.element
-destructorsynopsis.attlist &=
- attribute language { text }?,
- common.attrib,
- destructorsynopsis.role.attrib,
- local.destructorsynopsis.attrib
-# end of destructorsynopsis.attlist
-
-# end of destructorsynopsis.module
-local.methodsynopsis.attrib = empty
-methodsynopsis.role.attrib = role.attrib
-# doc:A syntax summary for a method.
-methodsynopsis =
- element methodsynopsis {
- methodsynopsis.attlist,
- modifier*,
- (type | void)?,
- methodname,
- (methodparam+ | void?),
- exceptionname*,
- modifier*
- }
-# end of methodsynopsis.element
-methodsynopsis.attlist &=
- attribute language { text }?,
- common.attrib,
- methodsynopsis.role.attrib,
- local.methodsynopsis.attrib
-# end of methodsynopsis.attlist
-
-# end of methodsynopsis.module
-local.methodname.attrib = empty
-methodname.role.attrib = role.attrib
-# doc:The name of a method.
-methodname =
- element methodname { methodname.attlist, smallcptr.char.mix* }
-# end of methodname.element
-methodname.attlist &=
- common.attrib, methodname.role.attrib, local.methodname.attrib
-# end of methodname.attlist
-
-# end of methodname.module
-local.methodparam.attrib = empty
-methodparam.role.attrib = role.attrib
-# doc:Parameters to a method.
-methodparam =
- element methodparam {
- methodparam.attlist,
- modifier*,
- type?,
- ((parameter, initializer?) | funcparams),
- modifier*
- }
-# end of methodparam.element
-methodparam.attlist &=
- [ a:defaultValue = "req" ]
- attribute choice { "opt" | "req" | "plain" }?,
- [ a:defaultValue = "norepeat" ]
- attribute rep { "norepeat" | "repeat" }?,
- common.attrib,
- methodparam.role.attrib,
- local.methodparam.attrib
-# end of methodparam.attlist
-
-# end of methodparam.module
-
-# end of classsynopsis.content.module
-
-# ......................................................................
-
-# Document information entities and elements ...........................
-
-# The document information elements include some elements that are
-# currently used only in the document hierarchy module. They are
-# defined here so that they will be available for use in customized
-# document hierarchies.
-
-# ..................................
-
-# Ackno ............................
-local.ackno.attrib = empty
-ackno.role.attrib = role.attrib
-# doc:Acknowledgements in an Article.
-ackno = element ackno { ackno.attlist, docinfo.char.mix* }
-# end of ackno.element
-ackno.attlist &= common.attrib, ackno.role.attrib, local.ackno.attrib
-# end of ackno.attlist
-
-# end of ackno.module
-
-# Address ..........................
-local.address.attrib = empty
-address.role.attrib = role.attrib
-# doc:A real-world address, generally a postal address.
-address =
- element address {
- address.attlist,
- (text
- | personname
- | person.ident.mix
- | street
- | pob
- | postcode
- | city
- | state
- | country
- | phone
- | fax
- | email
- | otheraddr)*
- }
-# end of address.element
-address.attlist &=
- linespecific.attrib,
- common.attrib,
- address.role.attrib,
- local.address.attrib
-# end of address.attlist
-
-# end of address.module
-local.street.attrib = empty
-street.role.attrib = role.attrib
-# doc:A street address in an address.
-street = element street { street.attlist, docinfo.char.mix* }
-# end of street.element
-street.attlist &= common.attrib, street.role.attrib, local.street.attrib
-# end of street.attlist
-
-# end of street.module
-local.pob.attrib = empty
-pob.role.attrib = role.attrib
-# doc:A post office box in an address.
-pob = element pob { pob.attlist, docinfo.char.mix* }
-# end of pob.element
-pob.attlist &= common.attrib, pob.role.attrib, local.pob.attrib
-# end of pob.attlist
-
-# end of pob.module
-local.postcode.attrib = empty
-postcode.role.attrib = role.attrib
-# doc:A postal code in an address.
-postcode = element postcode { postcode.attlist, docinfo.char.mix* }
-# end of postcode.element
-postcode.attlist &=
- common.attrib, postcode.role.attrib, local.postcode.attrib
-# end of postcode.attlist
-
-# end of postcode.module
-local.city.attrib = empty
-city.role.attrib = role.attrib
-# doc:The name of a city in an address.
-city = element city { city.attlist, docinfo.char.mix* }
-# end of city.element
-city.attlist &= common.attrib, city.role.attrib, local.city.attrib
-# end of city.attlist
-
-# end of city.module
-local.state.attrib = empty
-state.role.attrib = role.attrib
-# doc:A state or province in an address.
-state = element state { state.attlist, docinfo.char.mix* }
-# end of state.element
-state.attlist &= common.attrib, state.role.attrib, local.state.attrib
-# end of state.attlist
-
-# end of state.module
-local.country.attrib = empty
-country.role.attrib = role.attrib
-# doc:The name of a country.
-country = element country { country.attlist, docinfo.char.mix* }
-# end of country.element
-country.attlist &=
- common.attrib, country.role.attrib, local.country.attrib
-# end of country.attlist
-
-# end of country.module
-local.phone.attrib = empty
-phone.role.attrib = role.attrib
-# doc:A telephone number.
-phone = element phone { phone.attlist, docinfo.char.mix* }
-# end of phone.element
-phone.attlist &= common.attrib, phone.role.attrib, local.phone.attrib
-# end of phone.attlist
-
-# end of phone.module
-local.fax.attrib = empty
-fax.role.attrib = role.attrib
-# doc:A fax number.
-fax = element fax { fax.attlist, docinfo.char.mix* }
-# end of fax.element
-fax.attlist &= common.attrib, fax.role.attrib, local.fax.attrib
-# end of fax.attlist
-
-# end of fax.module
-
-# Email (defined in the Inlines section, below)
-local.otheraddr.attrib = empty
-otheraddr.role.attrib = role.attrib
-# doc:Uncategorized information in address.
-otheraddr = element otheraddr { otheraddr.attlist, docinfo.char.mix* }
-# end of otheraddr.element
-otheraddr.attlist &=
- common.attrib, otheraddr.role.attrib, local.otheraddr.attrib
-# end of otheraddr.attlist
-
-# end of otheraddr.module
-
-# end of address.content.module
-
-# Affiliation ......................
-local.affiliation.attrib = empty
-affiliation.role.attrib = role.attrib
-# doc:The institutional affiliation of an individual.
-affiliation =
- element affiliation {
- affiliation.attlist,
- shortaffil?,
- jobtitle*,
- orgname?,
- orgdiv*,
- address*
- }
-# end of affiliation.element
-affiliation.attlist &=
- common.attrib, affiliation.role.attrib, local.affiliation.attrib
-# end of affiliation.attlist
-
-# end of affiliation.module
-local.shortaffil.attrib = empty
-shortaffil.role.attrib = role.attrib
-# doc:A brief description of an affiliation.
-shortaffil =
- element shortaffil { shortaffil.attlist, docinfo.char.mix* }
-# end of shortaffil.element
-shortaffil.attlist &=
- common.attrib, shortaffil.role.attrib, local.shortaffil.attrib
-# end of shortaffil.attlist
-
-# end of shortaffil.module
-local.jobtitle.attrib = empty
-jobtitle.role.attrib = role.attrib
-# doc:The title of an individual in an organization.
-jobtitle = element jobtitle { jobtitle.attlist, docinfo.char.mix* }
-# end of jobtitle.element
-jobtitle.attlist &=
- common.attrib, jobtitle.role.attrib, local.jobtitle.attrib
-# end of jobtitle.attlist
-
-# end of jobtitle.module
-
-# OrgName (defined elsewhere in this section)
-local.orgdiv.attrib = empty
-orgdiv.role.attrib = role.attrib
-# doc:A division of an organization.
-orgdiv = element orgdiv { orgdiv.attlist, docinfo.char.mix* }
-# end of orgdiv.element
-orgdiv.attlist &= common.attrib, orgdiv.role.attrib, local.orgdiv.attrib
-# end of orgdiv.attlist
-
-# end of orgdiv.module
-
-# Address (defined elsewhere in this section)
-
-# end of affiliation.content.module
-
-# ArtPageNums ......................
-local.artpagenums.attrib = empty
-artpagenums.role.attrib = role.attrib
-# doc:The page numbers of an article as published.
-artpagenums =
- element artpagenums { artpagenums.attlist, docinfo.char.mix* }
-# end of artpagenums.element
-artpagenums.attlist &=
- common.attrib, artpagenums.role.attrib, local.artpagenums.attrib
-# end of artpagenums.attlist
-
-# end of artpagenums.module
-
-# PersonName
-local.personname.attrib = empty
-personname.role.attrib = role.attrib
-# doc:The personal name of an individual.
-personname =
- element personname {
- personname.attlist,
- (honorific | firstname | surname | lineage | othername)+
- }
-# end of personname.element
-personname.attlist &=
- common.attrib, personname.role.attrib, local.personname.attrib
-# end of personname.attlist
-
-# end of personname.module
-
-# Author ...........................
-local.author.attrib = empty
-author.role.attrib = role.attrib
-# doc:The name of an individual author.
-author =
- element author {
- author.attlist,
- (personname | person.ident.mix+),
- (personblurb | email | address)*
- }
-# end of author.element
-author.attlist &= common.attrib, author.role.attrib, local.author.attrib
-# end of author.attlist
-
-# (see "Personal identity elements" for %person.ident.mix;)
-
-# end of author.module
-
-# AuthorGroup ......................
-local.authorgroup.attrib = empty
-authorgroup.role.attrib = role.attrib
-# doc:Wrapper for author information when a document has multiple authors or
collabarators.
-authorgroup =
- element authorgroup {
- authorgroup.attlist,
- (author | editor | collab | corpauthor | corpcredit | othercredit)+
- }
-# end of authorgroup.element
-authorgroup.attlist &=
- common.attrib, authorgroup.role.attrib, local.authorgroup.attrib
-# end of authorgroup.attlist
-
-# end of authorgroup.module
-
-# Author (defined elsewhere in this section)
-
-# Editor (defined elsewhere in this section)
-local.collab.attrib = empty
-collab.role.attrib = role.attrib
-# doc:Identifies a collaborator.
-collab = element collab { collab.attlist, collabname, affiliation* }
-# end of collab.element
-collab.attlist &= common.attrib, collab.role.attrib, local.collab.attrib
-# end of collab.attlist
-
-# end of collab.module
-local.collabname.attrib = empty
-collabname.role.attrib = role.attrib
-# doc:The name of a collaborator.
-collabname =
- element collabname { collabname.attlist, docinfo.char.mix* }
-# end of collabname.element
-collabname.attlist &=
- common.attrib, collabname.role.attrib, local.collabname.attrib
-# end of collabname.attlist
-
-# end of collabname.module
-
-# Affiliation (defined elsewhere in this section)
-
-# end of collab.content.module
-
-# CorpAuthor (defined elsewhere in this section)
-
-# OtherCredit (defined elsewhere in this section)
-
-# end of authorgroup.content.module
-
-# AuthorInitials ...................
-local.authorinitials.attrib = empty
-authorinitials.role.attrib = role.attrib
-# doc:The initials or other short identifier for an author.
-authorinitials =
- element authorinitials { authorinitials.attlist, docinfo.char.mix* }
-# end of authorinitials.element
-authorinitials.attlist &=
- common.attrib, authorinitials.role.attrib, local.authorinitials.attrib
-# end of authorinitials.attlist
-
-# end of authorinitials.module
-
-# ConfGroup ........................
-local.confgroup.attrib = empty
-confgroup.role.attrib = role.attrib
-# doc:A wrapper for document meta-information about a conference.
-confgroup =
- element confgroup {
- confgroup.attlist,
- (confdates | conftitle | confnum | address | confsponsor)*
- }
-# end of confgroup.element
-confgroup.attlist &=
- common.attrib, confgroup.role.attrib, local.confgroup.attrib
-# end of confgroup.attlist
-
-# end of confgroup.module
-local.confdates.attrib = empty
-confdates.role.attrib = role.attrib
-# doc:The dates of a conference for which a document was written.
-confdates = element confdates { confdates.attlist, docinfo.char.mix* }
-# end of confdates.element
-confdates.attlist &=
- common.attrib, confdates.role.attrib, local.confdates.attrib
-# end of confdates.attlist
-
-# end of confdates.module
-local.conftitle.attrib = empty
-conftitle.role.attrib = role.attrib
-# doc:The title of a conference for which a document was written.
-conftitle = element conftitle { conftitle.attlist, docinfo.char.mix* }
-# end of conftitle.element
-conftitle.attlist &=
- common.attrib, conftitle.role.attrib, local.conftitle.attrib
-# end of conftitle.attlist
-
-# end of conftitle.module
-local.confnum.attrib = empty
-confnum.role.attrib = role.attrib
-# doc:An identifier, frequently numerical, associated with a conference for which a
document was written.
-confnum = element confnum { confnum.attlist, docinfo.char.mix* }
-# end of confnum.element
-confnum.attlist &=
- common.attrib, confnum.role.attrib, local.confnum.attrib
-# end of confnum.attlist
-
-# end of confnum.module
-
-# Address (defined elsewhere in this section)
-local.confsponsor.attrib = empty
-confsponsor.role.attrib = role.attrib
-# doc:The sponsor of a conference for which a document was written.
-confsponsor =
- element confsponsor { confsponsor.attlist, docinfo.char.mix* }
-# end of confsponsor.element
-confsponsor.attlist &=
- common.attrib, confsponsor.role.attrib, local.confsponsor.attrib
-# end of confsponsor.attlist
-
-# end of confsponsor.module
-
-# end of confgroup.content.module
-
-# ContractNum ......................
-local.contractnum.attrib = empty
-contractnum.role.attrib = role.attrib
-# doc:The contract number of a document.
-contractnum =
- element contractnum { contractnum.attlist, docinfo.char.mix* }
-# end of contractnum.element
-contractnum.attlist &=
- common.attrib, contractnum.role.attrib, local.contractnum.attrib
-# end of contractnum.attlist
-
-# end of contractnum.module
-
-# ContractSponsor ..................
-local.contractsponsor.attrib = empty
-contractsponsor.role.attrib = role.attrib
-# doc:The sponsor of a contract.
-contractsponsor =
- element contractsponsor { contractsponsor.attlist, docinfo.char.mix* }
-# end of contractsponsor.element
-contractsponsor.attlist &=
- common.attrib,
- contractsponsor.role.attrib,
- local.contractsponsor.attrib
-# end of contractsponsor.attlist
-
-# end of contractsponsor.module
-
-# Copyright ........................
-local.copyright.attrib = empty
-copyright.role.attrib = role.attrib
-# doc:Copyright information about a document.
-copyright = element copyright { copyright.attlist, year+, holder* }
-# end of copyright.element
-copyright.attlist &=
- common.attrib, copyright.role.attrib, local.copyright.attrib
-# end of copyright.attlist
-
-# end of copyright.module
-local.year.attrib = empty
-year.role.attrib = role.attrib
-# doc:The year of publication of a document.
-year = element year { year.attlist, docinfo.char.mix* }
-# end of year.element
-year.attlist &= common.attrib, year.role.attrib, local.year.attrib
-# end of year.attlist
-
-# end of year.module
-local.holder.attrib = empty
-holder.role.attrib = role.attrib
-# doc:The name of the individual or organization that holds a copyright.
-holder = element holder { holder.attlist, docinfo.char.mix* }
-# end of holder.element
-holder.attlist &= common.attrib, holder.role.attrib, local.holder.attrib
-# end of holder.attlist
-
-# end of holder.module
-
-# end of copyright.content.module
-
-# CorpAuthor .......................
-local.corpauthor.attrib = empty
-corpauthor.role.attrib = role.attrib
-# doc:A corporate author, as opposed to an individual.
-corpauthor =
- element corpauthor { corpauthor.attlist, docinfo.char.mix* }
-# end of corpauthor.element
-corpauthor.attlist &=
- common.attrib, corpauthor.role.attrib, local.corpauthor.attrib
-# end of corpauthor.attlist
-
-# end of corpauthor.module
-
-# CorpCredit ......................
-local.corpcredit.attrib = empty
-corpcredit.role.attrib = role.attrib
-# doc:A corporation or organization credited in a document.
-corpcredit =
- element corpcredit { corpcredit.attlist, docinfo.char.mix* }
-# end of corpcredit.element
-corpcredit.attlist &=
- attribute class {
- "graphicdesigner"
- | "productioneditor"
- | "copyeditor"
- | "technicaleditor"
- | "translator"
- | "other"
- }?,
- common.attrib,
- corpcredit.role.attrib,
- local.corpcredit.attrib
-# end of corpcredit.attlist
-
-# end of corpcredit.module
-
-# CorpName .........................
-local.corpname.attrib = empty
-# doc:The name of a corporation.
-corpname = element corpname { corpname.attlist, docinfo.char.mix* }
-# end of corpname.element
-corpname.role.attrib = role.attrib
-corpname.attlist &=
- common.attrib, corpname.role.attrib, local.corpname.attrib
-# end of corpname.attlist
-
-# end of corpname.module
-
-# Date .............................
-local.date.attrib = empty
-date.role.attrib = role.attrib
-# doc:The date of publication or revision of a document.
-date = element date { date.attlist, docinfo.char.mix* }
-# end of date.element
-date.attlist &= common.attrib, date.role.attrib, local.date.attrib
-# end of date.attlist
-
-# end of date.module
-
-# Edition ..........................
-local.edition.attrib = empty
-edition.role.attrib = role.attrib
-# doc:The name or number of an edition of a document.
-edition = element edition { edition.attlist, docinfo.char.mix* }
-# end of edition.element
-edition.attlist &=
- common.attrib, edition.role.attrib, local.edition.attrib
-# end of edition.attlist
-
-# end of edition.module
-
-# Editor ...........................
-local.editor.attrib = empty
-editor.role.attrib = role.attrib
-# doc:The name of the editor of a document.
-editor =
- element editor {
- editor.attlist,
- (personname | person.ident.mix+),
- (personblurb | email | address)*
- }
-# end of editor.element
-editor.attlist &= common.attrib, editor.role.attrib, local.editor.attrib
-# end of editor.attlist
-
-# (see "Personal identity elements" for %person.ident.mix;)
-
-# end of editor.module
-
-# ISBN .............................
-local.isbn.attrib = empty
-isbn.role.attrib = role.attrib
-# doc:The International Standard Book Number of a document.
-isbn = element isbn { isbn.attlist, docinfo.char.mix* }
-# end of isbn.element
-isbn.attlist &= common.attrib, isbn.role.attrib, local.isbn.attrib
-# end of isbn.attlist
-
-# end of isbn.module
-
-# ISSN .............................
-local.issn.attrib = empty
-issn.role.attrib = role.attrib
-# doc:The International Standard Serial Number of a periodical.
-issn = element issn { issn.attlist, docinfo.char.mix* }
-# end of issn.element
-issn.attlist &= common.attrib, issn.role.attrib, local.issn.attrib
-# end of issn.attlist
-
-# end of issn.module
-
-# BiblioId .................
-biblio.class.attrib =
- attribute class {
- "uri"
- | "doi"
- | "isbn"
- | "isrn"
- | "issn"
- | "libraryofcongress"
- | "pubnumber"
- | "other"
- }?,
- attribute otherclass { text }?
-local.biblioid.attrib = empty
-biblioid.role.attrib = role.attrib
-# doc:An identifier for a document.
-biblioid = element biblioid { biblioid.attlist, docinfo.char.mix* }
-# end of biblioid.element
-biblioid.attlist &=
- biblio.class.attrib,
- common.attrib,
- biblioid.role.attrib,
- local.biblioid.attrib
-# end of biblioid.attlist
-
-# end of biblioid.module
-
-# CiteBiblioId .................
-local.citebiblioid.attrib = empty
-citebiblioid.role.attrib = role.attrib
-# doc:A citation of a bibliographic identifier.
-citebiblioid =
- element citebiblioid { citebiblioid.attlist, docinfo.char.mix* }
-# end of citebiblioid.element
-citebiblioid.attlist &=
- biblio.class.attrib,
- common.attrib,
- citebiblioid.role.attrib,
- local.citebiblioid.attrib
-# end of citebiblioid.attlist
-
-# end of citebiblioid.module
-
-# BiblioSource .................
-local.bibliosource.attrib = empty
-bibliosource.role.attrib = role.attrib
-# doc:The source of a document.
-bibliosource =
- element bibliosource { bibliosource.attlist, docinfo.char.mix* }
-# end of bibliosource.element
-bibliosource.attlist &=
- biblio.class.attrib,
- common.attrib,
- bibliosource.role.attrib,
- local.bibliosource.attrib
-# end of bibliosource.attlist
-
-# end of bibliosource.module
-
-# BiblioRelation .................
-local.bibliorelation.attrib = empty
-local.bibliorelation.types = notAllowed
-bibliorelation.type.attrib =
- attribute type {
- "isversionof"
- | "hasversion"
- | "isreplacedby"
- | "replaces"
- | "isrequiredby"
- | "requires"
- | "ispartof"
- | "haspart"
- | "isreferencedby"
- | "references"
- | "isformatof"
- | "hasformat"
- | "othertype"
- | local.bibliorelation.types
- }?,
- attribute othertype { text }?
-bibliorelation.role.attrib = role.attrib
-# doc:The relationship of a document to another.
-bibliorelation =
- element bibliorelation { bibliorelation.attlist, docinfo.char.mix* }
-# end of bibliorelation.element
-bibliorelation.attlist &=
- biblio.class.attrib,
- bibliorelation.type.attrib,
- common.attrib,
- bibliorelation.role.attrib,
- local.bibliorelation.attrib
-# end of bibliorelation.attlist
-
-# end of bibliorelation.module
-
-# BiblioCoverage .................
-local.bibliocoverage.attrib = empty
-bibliocoverage.role.attrib = role.attrib
-# doc:The spatial or temporal coverage of a document.
-bibliocoverage =
- element bibliocoverage { bibliocoverage.attlist, docinfo.char.mix* }
-# end of bibliocoverage.element
-bibliocoverage.attlist &=
- attribute spatial {
- "dcmipoint" | "iso3166" | "dcmibox" | "tgn" |
"otherspatial"
- }?,
- attribute otherspatial { text }?,
- attribute temporal { "dcmiperiod" | "w3c-dtf" |
"othertemporal" }?,
- attribute othertemporal { text }?,
- common.attrib,
- bibliocoverage.role.attrib,
- local.bibliocoverage.attrib
-# end of bibliocoverage.attlist
-
-# end of bibliocoverage.module
-
-# InvPartNumber ....................
-local.invpartnumber.attrib = empty
-invpartnumber.role.attrib = role.attrib
-# doc:An inventory part number.
-invpartnumber =
- element invpartnumber { invpartnumber.attlist, docinfo.char.mix* }
-# end of invpartnumber.element
-invpartnumber.attlist &=
- common.attrib, invpartnumber.role.attrib, local.invpartnumber.attrib
-# end of invpartnumber.attlist
-
-# end of invpartnumber.module
-
-# IssueNum .........................
-local.issuenum.attrib = empty
-issuenum.role.attrib = role.attrib
-# doc:The number of an issue of a journal.
-issuenum = element issuenum { issuenum.attlist, docinfo.char.mix* }
-# end of issuenum.element
-issuenum.attlist &=
- common.attrib, issuenum.role.attrib, local.issuenum.attrib
-# end of issuenum.attlist
-
-# end of issuenum.module
-
-# LegalNotice ......................
-local.legalnotice.attrib = empty
-legalnotice.role.attrib = role.attrib
-# doc:A statement of legal obligations or requirements.
-legalnotice =
- element legalnotice {
- legalnotice.attlist, blockinfo?, title?, legalnotice.mix+
- }
-# end of legalnotice.element
-legalnotice.attlist &=
- common.attrib, legalnotice.role.attrib, local.legalnotice.attrib
-# end of legalnotice.attlist
-
-# end of legalnotice.module
-
-# ModeSpec .........................
-local.modespec.attrib = empty
-modespec.role.attrib = role.attrib
-# doc:Application-specific information necessary for the completion of an OLink.
-modespec = element modespec { modespec.attlist, docinfo.char.mix* }
-# end of modespec.element
-
-# Application: Type of action required for completion
-# of the links to which the ModeSpec is relevant (e.g.,
-# retrieval query)
-modespec.attlist &=
- attribute application { notation.class }?,
- common.attrib,
- modespec.role.attrib,
- local.modespec.attrib
-# end of modespec.attlist
-
-# end of modespec.module
-
-# OrgName ..........................
-local.orgname.attrib = empty
-orgname.role.attrib = role.attrib
-# doc:The name of an organization other than a corporation.
-orgname = element orgname { orgname.attlist, docinfo.char.mix* }
-# end of orgname.element
-orgname.attlist &=
- common.attrib,
- attribute class {
- "corporation" | "nonprofit" | "consortium" |
"informal" | "other"
- }?,
- attribute otherclass { text }?,
- orgname.role.attrib,
- local.orgname.attrib
-# end of orgname.attlist
-
-# end of orgname.module
-
-# OtherCredit ......................
-local.othercredit.attrib = empty
-othercredit.role.attrib = role.attrib
-# doc:A person or entity, other than an author or editor, credited in a document.
-othercredit =
- element othercredit {
- othercredit.attlist,
- (personname | person.ident.mix+),
- (personblurb | email | address)*
- }
-# end of othercredit.element
-othercredit.attlist &=
- attribute class {
- "graphicdesigner"
- | "productioneditor"
- | "copyeditor"
- | "technicaleditor"
- | "translator"
- | "other"
- }?,
- common.attrib,
- othercredit.role.attrib,
- local.othercredit.attrib
-# end of othercredit.attlist
-
-# (see "Personal identity elements" for %person.ident.mix;)
-
-# end of othercredit.module
-
-# PageNums .........................
-local.pagenums.attrib = empty
-pagenums.role.attrib = role.attrib
-# doc:The numbers of the pages in a book, for use in a bibliographic entry.
-pagenums = element pagenums { pagenums.attlist, docinfo.char.mix* }
-# end of pagenums.element
-pagenums.attlist &=
- common.attrib, pagenums.role.attrib, local.pagenums.attrib
-# end of pagenums.attlist
-
-# end of pagenums.module
-
-# Personal identity elements .......
-
-# These elements are used only within Author, Editor, and
-# OtherCredit.
-local.contrib.attrib = empty
-contrib.role.attrib = role.attrib
-# doc:A summary of the contributions made to a document by a credited source.
-contrib = element contrib { contrib.attlist, docinfo.char.mix* }
-# end of contrib.element
-contrib.attlist &=
- common.attrib, contrib.role.attrib, local.contrib.attrib
-# end of contrib.attlist
-
-# end of contrib.module
-local.firstname.attrib = empty
-firstname.role.attrib = role.attrib
-# doc:The first name of a person.
-firstname = element firstname { firstname.attlist, docinfo.char.mix* }
-# end of firstname.element
-firstname.attlist &=
- common.attrib, firstname.role.attrib, local.firstname.attrib
-# end of firstname.attlist
-
-# end of firstname.module
-local.honorific.attrib = empty
-honorific.role.attrib = role.attrib
-# doc:The title of a person.
-honorific = element honorific { honorific.attlist, docinfo.char.mix* }
-# end of honorific.element
-honorific.attlist &=
- common.attrib, honorific.role.attrib, local.honorific.attrib
-# end of honorific.attlist
-
-# end of honorific.module
-local.lineage.attrib = empty
-lineage.role.attrib = role.attrib
-# doc:The portion of a person's name indicating a relationship to ancestors.
-lineage = element lineage { lineage.attlist, docinfo.char.mix* }
-# end of lineage.element
-lineage.attlist &=
- common.attrib, lineage.role.attrib, local.lineage.attrib
-# end of lineage.attlist
-
-# end of lineage.module
-local.othername.attrib = empty
-othername.role.attrib = role.attrib
-# doc:A component of a persons name that is not a first name, surname, or lineage.
-othername = element othername { othername.attlist, docinfo.char.mix* }
-# end of othername.element
-othername.attlist &=
- common.attrib, othername.role.attrib, local.othername.attrib
-# end of othername.attlist
-
-# end of othername.module
-local.surname.attrib = empty
-surname.role.attrib = role.attrib
-# doc:A family name; in western cultures the last name.
-surname = element surname { surname.attlist, docinfo.char.mix* }
-# end of surname.element
-surname.attlist &=
- common.attrib, surname.role.attrib, local.surname.attrib
-# end of surname.attlist
-
-# end of surname.module
-
-# end of person.ident.module
-
-# PrintHistory .....................
-local.printhistory.attrib = empty
-printhistory.role.attrib = role.attrib
-# doc:The printing history of a document.
-printhistory =
- element printhistory { printhistory.attlist, para.class+ }
-# end of printhistory.element
-printhistory.attlist &=
- common.attrib, printhistory.role.attrib, local.printhistory.attrib
-# end of printhistory.attlist
-
-# end of printhistory.module
-
-# ProductName ......................
-local.productname.attrib = empty
-productname.role.attrib = role.attrib
-# doc:The formal name of a product.
-productname =
- element productname { productname.attlist, para.char.mix* }
-# end of productname.element
-
-# Class: More precisely identifies the item the element names
-productname.attlist &=
- [ a:defaultValue = "trade" ]
- attribute class { "service" | "trade" | "registered" |
"copyright" }?,
- common.attrib,
- productname.role.attrib,
- local.productname.attrib
-# end of productname.attlist
-
-# end of productname.module
-
-# ProductNumber ....................
-local.productnumber.attrib = empty
-productnumber.role.attrib = role.attrib
-# doc:A number assigned to a product.
-productnumber =
- element productnumber { productnumber.attlist, docinfo.char.mix* }
-# end of productnumber.element
-productnumber.attlist &=
- common.attrib, productnumber.role.attrib, local.productnumber.attrib
-# end of productnumber.attlist
-
-# end of productnumber.module
-
-# PubDate ..........................
-local.pubdate.attrib = empty
-pubdate.role.attrib = role.attrib
-# doc:The date of publication of a document.
-pubdate = element pubdate { pubdate.attlist, docinfo.char.mix* }
-# end of pubdate.element
-pubdate.attlist &=
- common.attrib, pubdate.role.attrib, local.pubdate.attrib
-# end of pubdate.attlist
-
-# end of pubdate.module
-
-# Publisher ........................
-local.publisher.attrib = empty
-publisher.role.attrib = role.attrib
-# doc:The publisher of a document.
-publisher =
- element publisher { publisher.attlist, publishername, address* }
-# end of publisher.element
-publisher.attlist &=
- common.attrib, publisher.role.attrib, local.publisher.attrib
-# end of publisher.attlist
-
-# end of publisher.module
-local.publishername.attrib = empty
-publishername.role.attrib = role.attrib
-# doc:The name of the publisher of a document.
-publishername =
- element publishername { publishername.attlist, docinfo.char.mix* }
-# end of publishername.element
-publishername.attlist &=
- common.attrib, publishername.role.attrib, local.publishername.attrib
-# end of publishername.attlist
-
-# end of publishername.module
-
-# Address (defined elsewhere in this section)
-
-# end of publisher.content.module
-
-# PubsNumber .......................
-local.pubsnumber.attrib = empty
-pubsnumber.role.attrib = role.attrib
-# doc:A number assigned to a publication other than an ISBN or ISSN or inventory part
number.
-pubsnumber =
- element pubsnumber { pubsnumber.attlist, docinfo.char.mix* }
-# end of pubsnumber.element
-pubsnumber.attlist &=
- common.attrib, pubsnumber.role.attrib, local.pubsnumber.attrib
-# end of pubsnumber.attlist
-
-# end of pubsnumber.module
-
-# ReleaseInfo ......................
-local.releaseinfo.attrib = empty
-releaseinfo.role.attrib = role.attrib
-# doc:Information about a particular release of a document.
-releaseinfo =
- element releaseinfo { releaseinfo.attlist, docinfo.char.mix* }
-# end of releaseinfo.element
-releaseinfo.attlist &=
- common.attrib, releaseinfo.role.attrib, local.releaseinfo.attrib
-# end of releaseinfo.attlist
-
-# end of releaseinfo.module
-
-# RevHistory .......................
-local.revhistory.attrib = empty
-revhistory.role.attrib = role.attrib
-# doc:A history of the revisions to a document.
-revhistory = element revhistory { revhistory.attlist, revision+ }
-# end of revhistory.element
-revhistory.attlist &=
- common.attrib, revhistory.role.attrib, local.revhistory.attrib
-# end of revhistory.attlist
-
-# end of revhistory.module
-local.revision.attrib = empty
-revision.role.attrib = role.attrib
-# doc:An entry describing a single revision in the history of the revisions to a
document.
-revision =
- element revision {
- revision.attlist,
- revnumber?,
- date,
- (author | authorinitials)*,
- (revremark | revdescription)?
- }
-# end of revision.element
-revision.attlist &=
- common.attrib, revision.role.attrib, local.revision.attrib
-# end of revision.attlist
-
-# end of revision.module
-local.revnumber.attrib = empty
-revnumber.role.attrib = role.attrib
-# doc:A document revision number.
-revnumber = element revnumber { revnumber.attlist, docinfo.char.mix* }
-# end of revnumber.element
-revnumber.attlist &=
- common.attrib, revnumber.role.attrib, local.revnumber.attrib
-# end of revnumber.attlist
-
-# end of revnumber.module
-
-# Date (defined elsewhere in this section)
-
-# AuthorInitials (defined elsewhere in this section)
-local.revremark.attrib = empty
-revremark.role.attrib = role.attrib
-# doc:A description of a revision to a document.
-revremark = element revremark { revremark.attlist, docinfo.char.mix* }
-# end of revremark.element
-revremark.attlist &=
- common.attrib, revremark.role.attrib, local.revremark.attrib
-# end of revremark.attlist
-
-# end of revremark.module
-local.revdescription.attrib = empty
-revdescription.role.attrib = role.attrib
-# doc:A extended description of a revision to a document.
-revdescription =
- element revdescription { revdescription.attlist, revdescription.mix+ }
-# end of revdescription.element
-revdescription.attlist &=
- common.attrib, revdescription.role.attrib, local.revdescription.attrib
-# end of revdescription.attlist
-
-# end of revdescription.module
-
-# end of revhistory.content.module
-
-# SeriesVolNums ....................
-local.seriesvolnums.attrib = empty
-seriesvolnums.role.attrib = role.attrib
-# doc:Numbers of the volumes in a series of books.
-seriesvolnums =
- element seriesvolnums { seriesvolnums.attlist, docinfo.char.mix* }
-# end of seriesvolnums.element
-seriesvolnums.attlist &=
- common.attrib, seriesvolnums.role.attrib, local.seriesvolnums.attrib
-# end of seriesvolnums.attlist
-
-# end of seriesvolnums.module
-
-# VolumeNum ........................
-local.volumenum.attrib = empty
-volumenum.role.attrib = role.attrib
-# doc:The volume number of a document in a set (as of books in a set or articles in a
journal).
-volumenum = element volumenum { volumenum.attlist, docinfo.char.mix* }
-# end of volumenum.element
-volumenum.attlist &=
- common.attrib, volumenum.role.attrib, local.volumenum.attrib
-# end of volumenum.attlist
-
-# end of volumenum.module
-
-# ..................................
-
-# end of docinfo.content.module
-
-# ......................................................................
-
-# Inline, link, and ubiquitous elements ................................
-
-# Technical and computer terms .........................................
-local.accel.attrib = empty
-accel.role.attrib = role.attrib
-# doc:A graphical user interface (GUI) keyboard shortcut.
-accel = element accel { accel.attlist, smallcptr.char.mix* }
-# end of accel.element
-accel.attlist &= common.attrib, accel.role.attrib, local.accel.attrib
-# end of accel.attlist
-
-# end of accel.module
-local.action.attrib = empty
-action.role.attrib = role.attrib
-# doc:A response to a user event.
-action = element action { action.attlist, cptr.char.mix* }
-# end of action.element
-action.attlist &=
- moreinfo.attrib,
- common.attrib,
- action.role.attrib,
- local.action.attrib
-# end of action.attlist
-
-# end of action.module
-local.application.attrib = empty
-application.role.attrib = role.attrib
-# doc:The name of a software program.
-application =
- element application { application.attlist, para.char.mix* }
-# end of application.element
-application.attlist &=
- attribute class { "hardware" | "software" }?,
- moreinfo.attrib,
- common.attrib,
- application.role.attrib,
- local.application.attrib
-# end of application.attlist
-
-# end of application.module
-local.classname.attrib = empty
-classname.role.attrib = role.attrib
-# doc:The name of a class, in the object-oriented programming sense.
-classname = element classname { classname.attlist, smallcptr.char.mix* }
-# end of classname.element
-classname.attlist &=
- common.attrib, classname.role.attrib, local.classname.attrib
-# end of classname.attlist
-
-# end of classname.module
-local.package.attrib = empty
-package.role.attrib = role.attrib
-# doc:A package.
-package = element package { package.attlist, smallcptr.char.mix* }
-# end of package.element
-package.attlist &=
- common.attrib, package.role.attrib, local.package.attrib
-# end of package.attlist
-
-# end of package.module
-local.co.attrib = empty
-# CO is a callout area of the LineColumn unit type (a single character
-# position); the position is directly indicated by the location of CO.
-co.role.attrib = role.attrib
-# doc:The location of a callout embedded in text.
-co = element co { co.attlist, empty }
-# end of co.element
-
-# bug number/symbol override or initialization
-
-# to any related information
-co.attlist &=
- label.attrib,
- linkends.attrib,
- idreq.common.attrib,
- co.role.attrib,
- local.co.attrib
-# end of co.attlist
-
-# end of co.module
-local.coref.attrib = empty
-# COREF is a reference to a CO
-coref.role.attrib = role.attrib
-# doc:A cross reference to a co.
-coref = element coref { coref.attlist, empty }
-# end of coref.element
-
-# bug number/symbol override or initialization
-
-# to any related information
-coref.attlist &=
- label.attrib,
- linkendreq.attrib,
- common.attrib,
- coref.role.attrib,
- local.coref.attrib
-# end of coref.attlist
-
-# end of coref.module
-local.command.attrib = empty
-command.role.attrib = role.attrib
-# doc:The name of an executable program or other software command.
-command = element command { command.attlist, cptr.char.mix* }
-# end of command.element
-command.attlist &=
- moreinfo.attrib,
- common.attrib,
- command.role.attrib,
- local.command.attrib
-# end of command.attlist
-
-# end of command.module
-local.computeroutput.attrib = empty
-computeroutput.role.attrib = role.attrib
-# doc:Data, generally text, displayed or presented by a computer.
-computeroutput =
- element computeroutput {
- computeroutput.attlist, (cptr.char.mix | co)*
- }
-# end of computeroutput.element
-computeroutput.attlist &=
- moreinfo.attrib,
- common.attrib,
- computeroutput.role.attrib,
- local.computeroutput.attrib
-# end of computeroutput.attlist
-
-# end of computeroutput.module
-local.database.attrib = empty
-database.role.attrib = role.attrib
-# doc:The name of a database, or part of a database.
-database = element database { database.attlist, cptr.char.mix* }
-# end of database.element
-
-# Class: Type of database the element names; no default
-database.attlist &=
- attribute class {
- "name"
- | "table"
- | "field"
- | "key1"
- | "key2"
- | "record"
- | "index"
- | "view"
- | "primarykey"
- | "secondarykey"
- | "foreignkey"
- | "altkey"
- | "procedure"
- | "datatype"
- | "constraint"
- | "rule"
- | "user"
- | "group"
- }?,
- moreinfo.attrib,
- common.attrib,
- database.role.attrib,
- local.database.attrib
-# end of database.attlist
-
-# end of database.module
-local.email.attrib = empty
-email.role.attrib = role.attrib
-# doc:An email address.
-email = element email { email.attlist, docinfo.char.mix* }
-# end of email.element
-email.attlist &= common.attrib, email.role.attrib, local.email.attrib
-# end of email.attlist
-
-# end of email.module
-local.envar.attrib = empty
-envar.role.attrib = role.attrib
-# doc:A software environment variable.
-envar = element envar { envar.attlist, smallcptr.char.mix* }
-# end of envar.element
-envar.attlist &= common.attrib, envar.role.attrib, local.envar.attrib
-# end of envar.attlist
-
-# end of envar.module
-local.errorcode.attrib = empty
-errorcode.role.attrib = role.attrib
-# doc:An error code.
-errorcode = element errorcode { errorcode.attlist, smallcptr.char.mix* }
-# end of errorcode.element
-errorcode.attlist &=
- moreinfo.attrib,
- common.attrib,
- errorcode.role.attrib,
- local.errorcode.attrib
-# end of errorcode.attlist
-
-# end of errorcode.module
-local.errorname.attrib = empty
-errorname.role.attrib = role.attrib
-# doc:An error name.
-errorname = element errorname { errorname.attlist, smallcptr.char.mix* }
-# end of errorname.element
-errorname.attlist &=
- common.attrib, errorname.role.attrib, local.errorname.attrib
-# end of errorname.attlist
-
-# end of errorname.module
-local.errortext.attrib = empty
-errortext.role.attrib = role.attrib
-# doc:An error message..
-errortext = element errortext { errortext.attlist, smallcptr.char.mix* }
-# end of errortext.element
-errortext.attlist &=
- common.attrib, errortext.role.attrib, local.errortext.attrib
-# end of errortext.attlist
-
-# end of errortext.module
-local.errortype.attrib = empty
-errortype.role.attrib = role.attrib
-# doc:The classification of an error message.
-errortype = element errortype { errortype.attlist, smallcptr.char.mix* }
-# end of errortype.element
-errortype.attlist &=
- common.attrib, errortype.role.attrib, local.errortype.attrib
-# end of errortype.attlist
-
-# end of errortype.module
-local.filename.attrib = empty
-filename.role.attrib = role.attrib
-# doc:The name of a file.
-filename = element filename { filename.attlist, cptr.char.mix* }
-# end of filename.element
-
-# Class: Type of filename the element names; no default
-
-# Path: Search path (possibly system-specific) in which
-# file can be found
-filename.attlist &=
- attribute class {
- "headerfile"
- | "partition"
- | "devicefile"
- | "libraryfile"
- | "directory"
- | "extension"
- | "symlink"
- }?,
- attribute path { text }?,
- moreinfo.attrib,
- common.attrib,
- filename.role.attrib,
- local.filename.attrib
-# end of filename.attlist
-
-# end of filename.module
-local.function.attrib = empty
-function.role.attrib = role.attrib
-# doc:The name of a function or subroutine, as in a programming language.
-function = element function { function.attlist, cptr.char.mix* }
-# end of function.element
-function.attlist &=
- moreinfo.attrib,
- common.attrib,
- function.role.attrib,
- local.function.attrib
-# end of function.attlist
-
-# end of function.module
-local.guibutton.attrib = empty
-guibutton.role.attrib = role.attrib
-# doc:The text on a button in a GUI.
-guibutton =
- element guibutton {
- guibutton.attlist,
- (smallcptr.char.mix | accel | superscript | subscript)*
- }
-# end of guibutton.element
-guibutton.attlist &=
- moreinfo.attrib,
- common.attrib,
- guibutton.role.attrib,
- local.guibutton.attrib
-# end of guibutton.attlist
-
-# end of guibutton.module
-local.guiicon.attrib = empty
-guiicon.role.attrib = role.attrib
-# doc:Graphic and/or text appearing as a icon in a GUI.
-guiicon =
- element guiicon {
- guiicon.attlist,
- (smallcptr.char.mix | accel | superscript | subscript)*
- }
-# end of guiicon.element
-guiicon.attlist &=
- moreinfo.attrib,
- common.attrib,
- guiicon.role.attrib,
- local.guiicon.attrib
-# end of guiicon.attlist
-
-# end of guiicon.module
-local.guilabel.attrib = empty
-guilabel.role.attrib = role.attrib
-# doc:The text of a label in a GUI.
-guilabel =
- element guilabel {
- guilabel.attlist,
- (smallcptr.char.mix | accel | superscript | subscript)*
- }
-# end of guilabel.element
-guilabel.attlist &=
- moreinfo.attrib,
- common.attrib,
- guilabel.role.attrib,
- local.guilabel.attrib
-# end of guilabel.attlist
-
-# end of guilabel.module
-local.guimenu.attrib = empty
-guimenu.role.attrib = role.attrib
-# doc:The name of a menu in a GUI.
-guimenu =
- element guimenu {
- guimenu.attlist,
- (smallcptr.char.mix | accel | superscript | subscript)*
- }
-# end of guimenu.element
-guimenu.attlist &=
- moreinfo.attrib,
- common.attrib,
- guimenu.role.attrib,
- local.guimenu.attrib
-# end of guimenu.attlist
-
-# end of guimenu.module
-local.guimenuitem.attrib = empty
-guimenuitem.role.attrib = role.attrib
-# doc:The name of a terminal menu item in a GUI.
-guimenuitem =
- element guimenuitem {
- guimenuitem.attlist,
- (smallcptr.char.mix | accel | superscript | subscript)*
- }
-# end of guimenuitem.element
-guimenuitem.attlist &=
- moreinfo.attrib,
- common.attrib,
- guimenuitem.role.attrib,
- local.guimenuitem.attrib
-# end of guimenuitem.attlist
-
-# end of guimenuitem.module
-local.guisubmenu.attrib = empty
-guisubmenu.role.attrib = role.attrib
-# doc:The name of a submenu in a GUI.
-guisubmenu =
- element guisubmenu {
- guisubmenu.attlist,
- (smallcptr.char.mix | accel | superscript | subscript)*
- }
-# end of guisubmenu.element
-guisubmenu.attlist &=
- moreinfo.attrib,
- common.attrib,
- guisubmenu.role.attrib,
- local.guisubmenu.attrib
-# end of guisubmenu.attlist
-
-# end of guisubmenu.module
-local.hardware.attrib = empty
-hardware.role.attrib = role.attrib
-# doc:A physical part of a computer system.
-hardware = element hardware { hardware.attlist, cptr.char.mix* }
-# end of hardware.element
-hardware.attlist &=
- moreinfo.attrib,
- common.attrib,
- hardware.role.attrib,
- local.hardware.attrib
-# end of hardware.attlist
-
-# end of hardware.module
-local.interface.attrib = empty
-interface.role.attrib = role.attrib
-# doc:An element of a GUI.
-interface =
- element interface { interface.attlist, (smallcptr.char.mix | accel)* }
-# end of interface.element
-
-# Class: Type of the Interface item; no default
-interface.attlist &=
- moreinfo.attrib,
- common.attrib,
- interface.role.attrib,
- local.interface.attrib
-# end of interface.attlist
-
-# end of interface.module
-local.keycap.attrib = empty
-keycap.role.attrib = role.attrib
-# doc:The text printed on a key on a keyboard.
-keycap = element keycap { keycap.attlist, cptr.char.mix* }
-# end of keycap.element
-keycap.attlist &=
- attribute function {
- "alt"
- | "control"
- | "shift"
- | "meta"
- | "escape"
- | "enter"
- | "tab"
- | "backspace"
- | "command"
- | "option"
- | "space"
- | "delete"
- | "insert"
- | "up"
- | "down"
- | "left"
- | "right"
- | "home"
- | "end"
- | "pageup"
- | "pagedown"
- | "other"
- }?,
- attribute otherfunction { text }?,
- moreinfo.attrib,
- common.attrib,
- keycap.role.attrib,
- local.keycap.attrib
-# end of keycap.attlist
-
-# end of keycap.module
-local.keycode.attrib = empty
-keycode.role.attrib = role.attrib
-# doc:The internal, frequently numeric, identifier for a key on a keyboard.
-keycode = element keycode { keycode.attlist, smallcptr.char.mix* }
-# end of keycode.element
-keycode.attlist &=
- common.attrib, keycode.role.attrib, local.keycode.attrib
-# end of keycode.attlist
-
-# end of keycode.module
-local.keycombo.attrib = empty
-keycombo.role.attrib = role.attrib
-# doc:A combination of input actions.
-keycombo =
- element keycombo {
- keycombo.attlist, (keycap | keycombo | keysym | mousebutton)+
- }
-# end of keycombo.element
-keycombo.attlist &=
- keyaction.attrib,
- moreinfo.attrib,
- common.attrib,
- keycombo.role.attrib,
- local.keycombo.attrib
-# end of keycombo.attlist
-
-# end of keycombo.module
-local.keysym.attrib = empty
-keysysm.role.attrib = role.attrib
-# doc:The symbolic name of a key on a keyboard.
-keysym = element keysym { keysym.attlist, smallcptr.char.mix* }
-# end of keysym.element
-keysym.attlist &=
- common.attrib, keysysm.role.attrib, local.keysym.attrib
-# end of keysym.attlist
-
-# end of keysym.module
-local.lineannotation.attrib = empty
-lineannotation.role.attrib = role.attrib
-# doc:A comment on a line in a verbatim listing.
-lineannotation =
- element lineannotation { lineannotation.attlist, para.char.mix* }
-# end of lineannotation.element
-lineannotation.attlist &=
- common.attrib, lineannotation.role.attrib, local.lineannotation.attrib
-# end of lineannotation.attlist
-
-# end of lineannotation.module
-local.literal.attrib = empty
-literal.role.attrib = role.attrib
-# doc:Inline text that is some literal value.
-literal = element literal { literal.attlist, cptr.char.mix* }
-# end of literal.element
-literal.attlist &=
- moreinfo.attrib,
- common.attrib,
- literal.role.attrib,
- local.literal.attrib
-# end of literal.attlist
-
-# end of literal.module
-local.code.attrib = empty
-code.role.attrib = role.attrib
-# doc:An inline code fragment.
-code = element code { code.attlist, cptr.char.mix* }
-# end of code.element
-code.attlist &=
- attribute language { text }?,
- common.attrib,
- code.role.attrib,
- local.code.attrib
-# end of code.attlist
-
-# end of code.module
-local.constant.attrib = empty
-constant.role.attrib = role.attrib
-# doc:A programming or system constant.
-constant = element constant { constant.attlist, smallcptr.char.mix* }
-# end of constant.element
-constant.attlist &=
- attribute class { "limit" }?,
- common.attrib,
- constant.role.attrib,
- local.constant.attrib
-# end of constant.attlist
-
-# end of constant.module
-local.varname.attrib = empty
-varname.role.attrib = role.attrib
-# doc:The name of a variable.
-varname = element varname { varname.attlist, smallcptr.char.mix* }
-# end of varname.element
-varname.attlist &=
- common.attrib, varname.role.attrib, local.varname.attrib
-# end of varname.attlist
-
-# end of varname.module
-local.markup.attrib = empty
-markup.role.attrib = role.attrib
-# doc:A string of formatting markup in text that is to be represented literally.
-markup = element markup { markup.attlist, smallcptr.char.mix* }
-# end of markup.element
-markup.attlist &= common.attrib, markup.role.attrib, local.markup.attrib
-# end of markup.attlist
-
-# end of markup.module
-local.medialabel.attrib = empty
-medialabel.role.attrib = role.attrib
-# doc:A name that identifies the physical medium on which some information resides.
-medialabel =
- element medialabel { medialabel.attlist, smallcptr.char.mix* }
-# end of medialabel.element
-
-# Class: Type of medium named by the element; no default
-medialabel.attlist &=
- attribute class { "cartridge" | "cdrom" | "disk" |
"tape" }?,
- common.attrib,
- medialabel.role.attrib,
- local.medialabel.attrib
-# end of medialabel.attlist
-
-# end of medialabel.module
-local.menuchoice.attrib = empty
-menuchoice.role.attrib = role.attrib
-# doc:A selection or series of selections from a menu.
-menuchoice =
- element menuchoice {
- menuchoice.attlist,
- shortcut?,
- (guibutton
- | guiicon
- | guilabel
- | guimenu
- | guimenuitem
- | guisubmenu
- | interface)+
- }
-# end of menuchoice.element
-menuchoice.attlist &=
- moreinfo.attrib,
- common.attrib,
- menuchoice.role.attrib,
- local.menuchoice.attrib
-# end of menuchoice.attlist
-
-# end of menuchoice.module
-
-# See also KeyCombo
-local.shortcut.attrib = empty
-shortcut.role.attrib = role.attrib
-# doc:A key combination for an action that is also accessible through a menu.
-shortcut =
- element shortcut {
- shortcut.attlist, (keycap | keycombo | keysym | mousebutton)+
- }
-# end of shortcut.element
-shortcut.attlist &=
- keyaction.attrib,
- moreinfo.attrib,
- common.attrib,
- shortcut.role.attrib,
- local.shortcut.attrib
-# end of shortcut.attlist
-
-# end of shortcut.module
-
-# end of menuchoice.content.module
-local.mousebutton.attrib = empty
-mousebutton.role.attrib = role.attrib
-# doc:The conventional name of a mouse button.
-mousebutton =
- element mousebutton { mousebutton.attlist, smallcptr.char.mix* }
-# end of mousebutton.element
-mousebutton.attlist &=
- moreinfo.attrib,
- common.attrib,
- mousebutton.role.attrib,
- local.mousebutton.attrib
-# end of mousebutton.attlist
-
-# end of mousebutton.module
-local.msgtext.attrib = empty
-msgtext.role.attrib = role.attrib
-# doc:The actual text of a message component in a message set.
-msgtext = element msgtext { msgtext.attlist, component.mix+ }
-# end of msgtext.element
-msgtext.attlist &=
- common.attrib, msgtext.role.attrib, local.msgtext.attrib
-# end of msgtext.attlist
-
-# end of msgtext.module
-local.option.attrib = empty
-option.role.attrib = role.attrib
-# doc:An option for a software command.
-option = element option { option.attlist, cptr.char.mix* }
-# end of option.element
-option.attlist &= common.attrib, option.role.attrib, local.option.attrib
-# end of option.attlist
-
-# end of option.module
-local.optional.attrib = empty
-optional.role.attrib = role.attrib
-# doc:Optional information.
-optional = element optional { optional.attlist, cptr.char.mix* }
-# end of optional.element
-optional.attlist &=
- common.attrib, optional.role.attrib, local.optional.attrib
-# end of optional.attlist
-
-# end of optional.module
-local.parameter.attrib = empty
-parameter.role.attrib = role.attrib
-# doc:A value or a symbolic reference to a value.
-parameter = element parameter { parameter.attlist, cptr.char.mix* }
-# end of parameter.element
-
-# Class: Type of the Parameter; no default
-parameter.attlist &=
- attribute class { "command" | "function" | "option" }?,
- moreinfo.attrib,
- common.attrib,
- parameter.role.attrib,
- local.parameter.attrib
-# end of parameter.attlist
-
-# end of parameter.module
-local.prompt.attrib = empty
-prompt.role.attrib = role.attrib
-# doc:A character or string indicating the start of an input field in a computer
display.
-prompt = element prompt { prompt.attlist, (smallcptr.char.mix | co)* }
-# end of prompt.element
-prompt.attlist &=
- moreinfo.attrib,
- common.attrib,
- prompt.role.attrib,
- local.prompt.attrib
-# end of prompt.attlist
-
-# end of prompt.module
-local.property.attrib = empty
-property.role.attrib = role.attrib
-# doc:A unit of data associated with some part of a computer system.
-property = element property { property.attlist, cptr.char.mix* }
-# end of property.element
-property.attlist &=
- moreinfo.attrib,
- common.attrib,
- property.role.attrib,
- local.property.attrib
-# end of property.attlist
-
-# end of property.module
-local.replaceable.attrib = empty
-replaceable.role.attrib = role.attrib
-# doc:Content that may or must be replaced by the user.
-replaceable =
- element replaceable {
- replaceable.attlist,
- (text
- | link.char.class
- | optional
- | base.char.class
- | other.char.class
- | inlinegraphic
- | inlinemediaobject
- | co)*
- }
-# end of replaceable.element
-
-# Class: Type of information the element represents; no
-# default
-replaceable.attlist &=
- attribute class { "command" | "function" | "option" |
"parameter" }?,
- common.attrib,
- replaceable.role.attrib,
- local.replaceable.attrib
-# end of replaceable.attlist
-
-# end of replaceable.module
-local.returnvalue.attrib = empty
-returnvalue.role.attrib = role.attrib
-# doc:The value returned by a function.
-returnvalue =
- element returnvalue { returnvalue.attlist, smallcptr.char.mix* }
-# end of returnvalue.element
-returnvalue.attlist &=
- common.attrib, returnvalue.role.attrib, local.returnvalue.attrib
-# end of returnvalue.attlist
-
-# end of returnvalue.module
-local.sgmltag.attrib = empty
-sgmltag.role.attrib = role.attrib
-# doc:A component of SGML markup.
-sgmltag = element sgmltag { sgmltag.attlist, smallcptr.char.mix* }
-# end of sgmltag.element
-
-# Class: Type of SGML construct the element names; no default
-sgmltag.attlist &=
- attribute class {
- "attribute"
- | "attvalue"
- | "element"
- | "endtag"
- | "emptytag"
- | "genentity"
- | "numcharref"
- | "paramentity"
- | "pi"
- | "xmlpi"
- | "starttag"
- | "sgmlcomment"
- | "prefix"
- | "namespace"
- | "localname"
- }?,
- attribute namespace { text }?,
- common.attrib,
- sgmltag.role.attrib,
- local.sgmltag.attrib
-# end of sgmltag.attlist
-
-# end of sgmltag.module
-local.structfield.attrib = empty
-structfield.role.attrib = role.attrib
-# doc:A field in a structure (in the programming language sense).
-structfield =
- element structfield { structfield.attlist, smallcptr.char.mix* }
-# end of structfield.element
-structfield.attlist &=
- common.attrib, structfield.role.attrib, local.structfield.attrib
-# end of structfield.attlist
-
-# end of structfield.module
-local.structname.attrib = empty
-structname.role.attrib = role.attrib
-# doc:The name of a structure (in the programming language sense).
-structname =
- element structname { structname.attlist, smallcptr.char.mix* }
-# end of structname.element
-structname.attlist &=
- common.attrib, structname.role.attrib, local.structname.attrib
-# end of structname.attlist
-
-# end of structname.module
-local.symbol.attrib = empty
-symbol.role.attrib = role.attrib
-# doc:A name that is replaced by a value before processing.
-symbol = element symbol { symbol.attlist, smallcptr.char.mix* }
-# end of symbol.element
-
-# Class: Type of symbol; no default
-symbol.attlist &=
- attribute class { "limit" }?,
- common.attrib,
- symbol.role.attrib,
- local.symbol.attrib
-# end of symbol.attlist
-
-# end of symbol.module
-local.systemitem.attrib = empty
-systemitem.role.attrib = role.attrib
-# doc:A system-related item or term.
-systemitem =
- element systemitem {
- systemitem.attlist, (cptr.char.mix | acronym | co)*
- }
-# end of systemitem.element
-
-# Class: Type of system item the element names; no default
-systemitem.attlist &=
- attribute class {
- "constant"
- | "daemon"
- | "domainname"
- | "etheraddress"
- | "event"
- | "eventhandler"
- | "filesystem"
- | "fqdomainname"
- | "groupname"
- | "ipaddress"
- | "library"
- | "macro"
- | "netmask"
- | "newsgroup"
- | "osname"
- | "protocol"
- | "resource"
- | "systemname"
- | "username"
- | "process"
- | "server"
- | "service"
- }?,
- moreinfo.attrib,
- common.attrib,
- systemitem.role.attrib,
- local.systemitem.attrib
-# end of systemitem.attlist
-
-# end of systemitem.module
-local.uri.attrib = empty
-uri.role.attrib = role.attrib
-# doc:A Uniform Resource Identifier.
-uri = element uri { uri.attlist, smallcptr.char.mix* }
-# end of uri.element
-
-# Type: Type of URI; no default
-uri.attlist &=
- attribute type { text }?,
- common.attrib,
- uri.role.attrib,
- local.uri.attrib
-# end of uri.attlist
-
-# end of uri.module
-local.token.attrib = empty
-token.role.attrib = role.attrib
-# doc:A unit of information.
-\token = element token { token.attlist, smallcptr.char.mix* }
-# end of token.element
-token.attlist &= common.attrib, token.role.attrib, local.token.attrib
-# end of token.attlist
-
-# end of token.module
-local.type.attrib = empty
-type.role.attrib = role.attrib
-# doc:The classification of a value.
-type = element type { type.attlist, smallcptr.char.mix* }
-# end of type.element
-type.attlist &= common.attrib, type.role.attrib, local.type.attrib
-# end of type.attlist
-
-# end of type.module
-local.userinput.attrib = empty
-userinput.role.attrib = role.attrib
-# doc:Data entered by the user.
-userinput =
- element userinput { userinput.attlist, (cptr.char.mix | co)* }
-# end of userinput.element
-userinput.attlist &=
- moreinfo.attrib,
- common.attrib,
- userinput.role.attrib,
- local.userinput.attrib
-# end of userinput.attlist
-
-# end of userinput.module
-local.termdef.attrib = empty
-termdef.role.attrib = role.attrib
-# doc:An inline definition of a term.
-termdef = element termdef { termdef.attlist, para.char.mix* }
-# end of termdef.element
-termdef.attlist &=
- common.attrib, termdef.role.attrib, local.termdef.attrib
-# end of termdef.attlist
-
-# end of termdef.module
-
-# General words and phrases ............................................
-local.abbrev.attrib = empty
-abbrev.role.attrib = role.attrib
-# doc:An abbreviation, especially one followed by a period.
-abbrev = element abbrev { abbrev.attlist, word.char.mix* }
-# end of abbrev.element
-abbrev.attlist &= common.attrib, abbrev.role.attrib, local.abbrev.attrib
-# end of abbrev.attlist
-
-# end of abbrev.module
-local.acronym.attrib = empty
-acronym.role.attrib = role.attrib
-# doc:An often pronounceable word made from the initial (or selected) letters of a name
or phrase.
-acronym = element acronym { acronym.attlist, word.char.mix* }
-# end of acronym.element
-acronym.attlist &=
- common.attrib, acronym.role.attrib, local.acronym.attrib
-# end of acronym.attlist
-
-# end of acronym.module
-local.citation.attrib = empty
-citation.role.attrib = role.attrib
-# doc:An inline bibliographic reference to another published work.
-citation = element citation { citation.attlist, para.char.mix* }
-# end of citation.element
-citation.attlist &=
- common.attrib, citation.role.attrib, local.citation.attrib
-# end of citation.attlist
-
-# end of citation.module
-local.citerefentry.attrib = empty
-citerefentry.role.attrib = role.attrib
-# doc:A citation to a reference page.
-citerefentry =
- element citerefentry {
- citerefentry.attlist, refentrytitle, manvolnum?
- }
-# end of citerefentry.element
-citerefentry.attlist &=
- common.attrib, citerefentry.role.attrib, local.citerefentry.attrib
-# end of citerefentry.attlist
-
-# end of citerefentry.module
-local.refentrytitle.attrib = empty
-refentrytitle.role.attrib = role.attrib
-# doc:The title of a reference page.
-refentrytitle =
- element refentrytitle { refentrytitle.attlist, para.char.mix* }
-# end of refentrytitle.element
-refentrytitle.attlist &=
- common.attrib, refentrytitle.role.attrib, local.refentrytitle.attrib
-# end of refentrytitle.attlist
-
-# end of refentrytitle.module
-local.manvolnum.attrib = empty
-namvolnum.role.attrib = role.attrib
-# doc:A reference volume number.
-manvolnum = element manvolnum { manvolnum.attlist, word.char.mix* }
-# end of manvolnum.element
-manvolnum.attlist &=
- common.attrib, namvolnum.role.attrib, local.manvolnum.attrib
-# end of manvolnum.attlist
-
-# end of manvolnum.module
-local.citetitle.attrib = empty
-citetitle.role.attrib = role.attrib
-# doc:The title of a cited work.
-citetitle = element citetitle { citetitle.attlist, para.char.mix* }
-# end of citetitle.element
-
-# Pubwork: Genre of published work cited; no default
-citetitle.attlist &=
- attribute pubwork {
- "article"
- | "book"
- | "chapter"
- | "part"
- | "refentry"
- | "section"
- | "journal"
- | "series"
- | "set"
- | "manuscript"
- | "cdrom"
- | "dvd"
- | "wiki"
- | "gopher"
- | "bbs"
- | "emailmessage"
- | "webpage"
- | "newsposting"
- }?,
- common.attrib,
- citetitle.role.attrib,
- local.citetitle.attrib
-# end of citetitle.attlist
-
-# end of citetitle.module
-local.emphasis.attrib = empty
-emphasis.role.attrib = role.attrib
-# doc:Emphasized text.
-emphasis = element emphasis { emphasis.attlist, para.char.mix* }
-# end of emphasis.element
-emphasis.attlist &=
- common.attrib, emphasis.role.attrib, local.emphasis.attrib
-# end of emphasis.attlist
-
-# end of emphasis.module
-local.foreignphrase.attrib = empty
-foreignphrase.role.attrib = role.attrib
-# doc:A word or phrase in a language other than the primary language of the document.
-foreignphrase =
- element foreignphrase { foreignphrase.attlist, para.char.mix* }
-# end of foreignphrase.element
-foreignphrase.attlist &=
- common.attrib, foreignphrase.role.attrib, local.foreignphrase.attrib
-# end of foreignphrase.attlist
-
-# end of foreignphrase.module
-local.glossterm.attrib = empty
-glossterm.role.attrib = role.attrib
-# doc:A glossary term.
-glossterm = element glossterm { glossterm.attlist, para.char.mix* }
-# end of glossterm.element
-
-# to GlossEntry if Glossterm used in text
-
-# BaseForm: Provides the form of GlossTerm to be used
-# for indexing
-glossterm.attlist &=
- attribute baseform { text }?,
- linkend.attrib,
- common.attrib,
- glossterm.role.attrib,
- local.glossterm.attrib
-# end of glossterm.attlist
-
-# end of glossterm.module
-local.firstterm.attrib = empty
-firstterm.role.attrib = role.attrib
-# doc:The first occurrence of a term.
-firstterm = element firstterm { firstterm.attlist, para.char.mix* }
-# end of firstterm.element
-
-# to GlossEntry or other explanation
-firstterm.attlist &=
- attribute baseform { text }?,
- linkend.attrib,
- common.attrib,
- firstterm.role.attrib,
- local.firstterm.attrib
-# end of firstterm.attlist
-
-# end of firstterm.module
-local.phrase.attrib = empty
-phrase.role.attrib = role.attrib
-# doc:A span of text.
-phrase = element phrase { phrase.attlist, para.char.mix* }
-# end of phrase.element
-phrase.attlist &= common.attrib, phrase.role.attrib, local.phrase.attrib
-# end of phrase.attlist
-
-# end of phrase.module
-local.quote.attrib = empty
-quote.role.attrib = role.attrib
-# doc:An inline quotation.
-quote = element quote { quote.attlist, para.char.mix* }
-# end of quote.element
-quote.attlist &= common.attrib, quote.role.attrib, local.quote.attrib
-# end of quote.attlist
-
-# end of quote.module
-local.ssscript.attrib = empty
-ssscript.role.attrib = role.attrib
-# doc:A subscript (as in H{^2}O, the molecular formula for water).
-subscript =
- element subscript {
- subscript.attlist,
- (text
- | link.char.class
- | emphasis
- | replaceable
- | symbol
- | inlinegraphic
- | inlinemediaobject
- | base.char.class
- | other.char.class)*
- }
-# end of subscript.element
-subscript.attlist &=
- common.attrib, ssscript.role.attrib, local.ssscript.attrib
-# end of subscript.attlist
-
-# doc:A superscript (as in x^2, the mathematical notation for x multiplied by itself).
-superscript =
- element superscript {
- superscript.attlist,
- (text
- | link.char.class
- | emphasis
- | replaceable
- | symbol
- | inlinegraphic
- | inlinemediaobject
- | base.char.class
- | other.char.class)*
- }
-# end of superscript.element
-superscript.attlist &=
- common.attrib, ssscript.role.attrib, local.ssscript.attrib
-# end of superscript.attlist
-
-# end of ssscript.module
-local.trademark.attrib = empty
-trademark.role.attrib = role.attrib
-# doc:A trademark.
-trademark =
- element trademark {
- trademark.attlist,
- (text
- | link.char.class
- | tech.char.class
- | base.char.class
- | other.char.class
- | inlinegraphic
- | inlinemediaobject
- | emphasis)*
- }
-# end of trademark.element
-
-# Class: More precisely identifies the item the element names
-trademark.attlist &=
- [ a:defaultValue = "trade" ]
- attribute class { "service" | "trade" | "registered" |
"copyright" }?,
- common.attrib,
- trademark.role.attrib,
- local.trademark.attrib
-# end of trademark.attlist
-
-# end of trademark.module
-local.wordasword.attrib = empty
-wordasword.role.attrib = role.attrib
-# doc:A word meant specifically as a word and not representing anything else.
-wordasword = element wordasword { wordasword.attlist, word.char.mix* }
-# end of wordasword.element
-wordasword.attlist &=
- common.attrib, wordasword.role.attrib, local.wordasword.attrib
-# end of wordasword.attlist
-
-# end of wordasword.module
-
-# Links and cross-references ...........................................
-local.link.attrib = empty
-link.role.attrib = role.attrib
-# doc:A hypertext link.
-link = element link { link.attlist, para.char.mix* }
-# end of link.element
-
-# Endterm: ID of element containing text that is to be
-# fetched from elsewhere in the document to appear as
-# the content of this element
-
-# to linked-to object
-
-# Type: Freely assignable parameter
-link.attlist &=
- attribute endterm { xsd:IDREF }?,
- attribute xrefstyle { text }?,
- attribute type { text }?,
- linkendreq.attrib,
- common.attrib,
- link.role.attrib,
- local.link.attrib
-# end of link.attlist
-
-# end of link.module
-local.olink.attrib = empty
-olink.role.attrib = role.attrib
-# doc:A link that addresses its target indirectly, through an entity.
-olink = element olink { olink.attlist, para.char.mix* }
-# end of olink.element
-
-# TargetDocEnt: Name of an entity to be the target of the link
-
-# LinkMode: ID of a ModeSpec containing instructions for
-# operating on the entity named by TargetDocEnt
-
-# LocalInfo: Information that may be passed to ModeSpec
-
-# Type: Freely assignable parameter
-olink.attlist &=
- attribute targetdocent { xsd:ENTITY }?,
- attribute linkmode { xsd:IDREF }?,
- attribute localinfo { text }?,
- attribute type { text }?,
- attribute targetdoc { text }?,
- attribute targetptr { text }?,
- attribute xrefstyle { text }?,
- common.attrib,
- olink.role.attrib,
- local.olink.attrib
-# end of olink.attlist
-
-# end of olink.module
-local.ulink.attrib = empty
-ulink.role.attrib = role.attrib
-# doc:A link that addresses its target by means of a URL (Uniform Resource Locator).
-ulink = element ulink { ulink.attlist, para.char.mix* }
-# end of ulink.element
-
-# URL: uniform resource locator; the target of the ULink
-
-# Type: Freely assignable parameter
-ulink.attlist &=
- attribute url { text },
- attribute type { text }?,
- attribute xrefstyle { text }?,
- common.attrib,
- ulink.role.attrib,
- local.ulink.attrib
-# end of ulink.attlist
-
-# end of ulink.module
-local.footnoteref.attrib = empty
-footnoteref.role.attrib = role.attrib
-# doc:A cross reference to a footnote (a footnote mark).
-footnoteref = element footnoteref { footnoteref.attlist, empty }
-# end of footnoteref.element
-
-# to footnote content supplied elsewhere
-footnoteref.attlist &=
- linkendreq.attrib,
- label.attrib,
- common.attrib,
- footnoteref.role.attrib,
- local.footnoteref.attrib
-# end of footnoteref.attlist
-
-# end of footnoteref.module
-local.xref.attrib = empty
-xref.role.attrib = role.attrib
-# doc:A cross reference to another part of the document.
-xref = element xref { xref.attlist, empty }
-# end of xref.element
-
-# Endterm: ID of element containing text that is to be
-# fetched from elsewhere in the document to appear as
-# the content of this element
-
-# to linked-to object
-xref.attlist &=
- attribute endterm { xsd:IDREF }?,
- attribute xrefstyle { text }?,
- common.attrib,
- linkendreq.attrib,
- xref.role.attrib,
- local.xref.attrib
-# end of xref.attlist
-
-# end of xref.module
-local.biblioref.attrib = empty
-biblioref.role.attrib = role.attrib
-# doc:A cross reference to a bibliographic entry.
-biblioref = element biblioref { biblioref.attlist, empty }
-# end of biblioref.element
-biblioref.attlist &=
- attribute endterm { xsd:IDREF }?,
- attribute xrefstyle { text }?,
- attribute units { text }?,
- attribute begin { text }?,
- attribute end { text }?,
- common.attrib,
- linkendreq.attrib,
- biblioref.role.attrib,
- local.biblioref.attrib
-# end of biblioref.attlist
-
-# end of biblioref.module
-
-# Ubiquitous elements ..................................................
-local.anchor.attrib = empty
-anchor.role.attrib = role.attrib
-# doc:A spot in the document.
-anchor = element anchor { anchor.attlist, empty }
-# end of anchor.element
-
-# required
-
-# replaces Lang
-anchor.attlist &=
- idreq.attrib,
- pagenum.attrib,
- remap.attrib,
- xreflabel.attrib,
- revisionflag.attrib,
- effectivity.attrib,
- anchor.role.attrib,
- local.anchor.attrib
-# end of anchor.attlist
-
-# end of anchor.module
-local.beginpage.attrib = empty
-beginpage.role.attrib = role.attrib
-# doc:The location of a page break in a print version of the document.
-beginpage = element beginpage { beginpage.attlist, empty }
-# end of beginpage.element
-
-# PageNum: Number of page that begins at this point
-beginpage.attlist &=
- pagenum.attrib,
- common.attrib,
- beginpage.role.attrib,
- local.beginpage.attrib
-# end of beginpage.attlist
-
-# end of beginpage.module
-
-# IndexTerms appear in the text flow for generating or linking an
-# index.
-local.indexterm.attrib = empty
-indexterm.role.attrib = role.attrib
-# doc:A wrapper for terms to be indexed.
-indexterm =
- element indexterm {
- indexterm.attlist,
- primary?,
- ((secondary,
- ((tertiary, (see | seealso+)?)
- | see
- | seealso+)?)
- | see
- | seealso+)?
- }
-# end of indexterm.element
-
-# Scope: Indicates which generated indices the IndexTerm
-# should appear in: Global (whole document set), Local (this
-# document only), or All (both)
-
-# Significance: Whether this IndexTerm is the most pertinent
-# of its series (Preferred) or not (Normal, the default)
-
-# Class: Indicates type of IndexTerm; default is Singular,
-# or EndOfRange if StartRef is supplied; StartOfRange value
-# must be supplied explicitly on starts of ranges
-
-# StartRef: ID of the IndexTerm that starts the indexing
-# range ended by this IndexTerm
-
-# Zone: IDs of the elements to which the IndexTerm applies,
-# and indicates that the IndexTerm applies to those entire
-# elements rather than the point at which the IndexTerm
-# occurs
-indexterm.attlist &=
- pagenum.attrib,
- attribute scope { "all" | "global" | "local" }?,
- [ a:defaultValue = "normal" ]
- attribute significance { "preferred" | "normal" }?,
- attribute class { "singular" | "startofrange" |
"endofrange" }?,
- attribute startref { xsd:IDREF }?,
- attribute zone { xsd:IDREFS }?,
- attribute type { text }?,
- common.attrib,
- indexterm.role.attrib,
- local.indexterm.attrib
-# end of indexterm.attlist
-
-# end of indexterm.module
-local.primsecter.attrib = empty
-primsecter.role.attrib = role.attrib
-# doc:The primary word or phrase under which an index term should be sorted.
-primary = element primary { primary.attlist, ndxterm.char.mix* }
-# end of primary.element
-
-# SortAs: Alternate sort string for index sorting, e.g.,
-# "fourteen" for an element containing "14"
-primary.attlist &=
- attribute sortas { text }?,
- common.attrib,
- primsecter.role.attrib,
- local.primsecter.attrib
-# end of primary.attlist
-
-# doc:A secondary word or phrase in an index term.
-secondary = element secondary { secondary.attlist, ndxterm.char.mix* }
-# end of secondary.element
-
-# SortAs: Alternate sort string for index sorting, e.g.,
-# "fourteen" for an element containing "14"
-secondary.attlist &=
- attribute sortas { text }?,
- common.attrib,
- primsecter.role.attrib,
- local.primsecter.attrib
-# end of secondary.attlist
-
-# doc:A tertiary word or phrase in an index term.
-tertiary = element tertiary { tertiary.attlist, ndxterm.char.mix* }
-# end of tertiary.element
-
-# SortAs: Alternate sort string for index sorting, e.g.,
-# "fourteen" for an element containing "14"
-tertiary.attlist &=
- attribute sortas { text }?,
- common.attrib,
- primsecter.role.attrib,
- local.primsecter.attrib
-# end of tertiary.attlist
-
-# end of primsecter.module
-local.seeseealso.attrib = empty
-seeseealso.role.attrib = role.attrib
-# doc:Part of an index term directing the reader instead to another entry in the index.
-see = element see { see.attlist, ndxterm.char.mix* }
-# end of see.element
-see.attlist &=
- common.attrib, seeseealso.role.attrib, local.seeseealso.attrib
-# end of see.attlist
-
-# doc:Part of an index term directing the reader also to another entry in the index.
-seealso = element seealso { seealso.attlist, ndxterm.char.mix* }
-# end of seealso.element
-seealso.attlist &=
- common.attrib, seeseealso.role.attrib, local.seeseealso.attrib
-# end of seealso.attlist
-
-# end of seeseealso.module
-
-# end of indexterm.content.module
-
-# End of DocBook XML information pool module V4.5 ......................
-
-# ......................................................................
diff --git a/defensive-coding/docbook-schema/.svn/text-base/docbook.rnc.svn-base
b/defensive-coding/docbook-schema/.svn/text-base/docbook.rnc.svn-base
deleted file mode 100644
index 8a0a75a..0000000
--- a/defensive-coding/docbook-schema/.svn/text-base/docbook.rnc.svn-base
+++ /dev/null
@@ -1,499 +0,0 @@
-# ......................................................................
-
-# DocBook XML DTD V4.5 .................................................
-
-# File docbookx.dtd ....................................................
-
-# Copyright 1992-2006 HaL Computer Systems, Inc.,
-# O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
-# Corporation, Norman Walsh, Sun Microsystems, Inc., and the
-# Organization for the Advancement of Structured Information
-# Standards (OASIS).
-#
-# See also
http://docbook.org/specs/
-#
-# $Id: docbookx.dtd 6340 2006-10-03 13:23:24Z nwalsh $
-#
-# Permission to use, copy, modify and distribute the DocBook XML DTD
-# and its accompanying documentation for any purpose and without fee
-# is hereby granted in perpetuity, provided that the above copyright
-# notice and this paragraph appear in all copies. The copyright
-# holders make no representation about the suitability of the DTD for
-# any purpose. It is provided "as is" without expressed or implied
-# warranty.
-#
-# If you modify the DocBook DTD in any way, except for declaring and
-# referencing additional sets of general entities and declaring
-# additional notations, label your DTD as a variant of DocBook. See
-# the maintenance documentation for more information.
-#
-# Please direct all questions, bug reports, or suggestions for
-# changes to the docbook(a)lists.oasis-open.org mailing list. For more
-# information, see
http://www.oasis-open.org/docbook/.
-
-# ......................................................................
-
-# This is the driver file for V4.5 of the DocBook DTD.
-# Please use the following formal public identifier to identify it:
-#
-# "-//OASIS//DTD DocBook XML V4.5//EN"
-#
-# For example, if your document's top-level element is Book, and
-# you are using DocBook directly, use the FPI in the DOCTYPE
-# declaration:
-#
-# <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-# "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
-# [...]>
-#
-# Or, if you have a higher-level driver file that customizes DocBook,
-# use the FPI in the parameter entity declaration:
-#
-# <!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-# "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-# %DocBookDTD;
-#
-# See the documentation for detailed information on the parameter
-# entity and module scheme used in DocBook, customizing DocBook and
-# planning for interchange, and changes made since the last release
-# of DocBook.
-
-# ......................................................................
-
-# Enable SGML features .................................................
-
-# ......................................................................
-
-# Notation declarations ................................................
-
-include "dbnotnx.rnc"
-# ......................................................................
-
-# ISO character entity sets ............................................
-
-# euro sign, U+20AC NEW
-
-# ......................................................................
-
-# DTD modules ..........................................................
-
-# Information pool ..............
-include "dbpoolx.rnc"
-# Redeclaration placeholder .....
-
-# Document hierarchy ............
-include "dbhierx.rnc"
-start =
- articleinfo
- | honorific
- | legalnotice
- | procedure
- | simplelist
- | keycode
- | refsynopsisdiv
- | article
- | phrase
- | destructorsynopsis
- | itemizedlist
- | audioobject
- | link
- | sect1info
- | xref
- | glossaryinfo
- | varname
- | keywordset
- | informalequation
- | toc
- | pagenums
- | lot
- | shortcut
- | glosslist
- | option
- | bibliosource
- | variablelist
- | filename
- | pob
- | colgroup
- | foreignphrase
- | group
- | substeps
- | conftitle
- | textobject
- | menuchoice
- | colspec
- | contractsponsor
- | tocback
- | contractnum
- | constant
- | dedication
- | inlineequation
- | bibliographyinfo
- | country
- | glossseealso
- | bridgehead
- | mousebutton
- | surname
- | stepalternatives
- | tertiaryie
- | mediaobject
- | msgentry
- | fax
- | initializer
- | table
- | task
- | setinfo
- | videodata
- | bibliodiv
- | issuenum
- | phone
- | state
- | refsynopsisdivinfo
- | member
- | glossentry
- | term
- | msgtext
- | tr
- | errortype
- | confdates
- | inlinegraphic
- | th
- | segmentedlist
- | remark
- | preface
- | structname
- | publisher
- | td
- | oointerface
- | refsection
- | type
- | taskrelated
- | msgrel
- | artpagenums
- | bibliomixed
- | revnumber
- | firstterm
- | seeie
- | spanspec
- | toclevel5
- | trademark
- | toclevel4
- | toclevel3
- | toclevel2
- | indexentry
- | toclevel1
- | colophon
- | methodparam
- | sidebarinfo
- | productnumber
- | funcprototype
- | inlinemediaobject
- | refclass
- | lotentry
- | paramdef
- | classsynopsisinfo
- | qandaset
- | footnote
- | msglevel
- | keysym
- | citation
- | simplemsgentry
- | othercredit
- | subjectset
- | keycap
- | orderedlist
- | refmiscinfo
- | blockinfo
- | programlistingco
- | abbrev
- | sidebar
- | informalfigure
- | tip
- | primaryie
- | appendixinfo
- | partintro
- | glossdiv
- | confgroup
- | segtitle
- | taskprerequisites
- | street
- | tbody
- | caption
- | markup
- | setindex
- | msgsub
- | subscript
- | orgname
- | fieldsynopsis
- | refname
- | void
- | sect5
- | sect4
- | sect3
- | chapter
- | sect2
- | sect1
- | modifier
- | col
- | orgdiv
- | city
- | bibliolist
- | funcparams
- | application
- | \token
- | imageobject
- | literal
- | funcsynopsis
- | olink
- | package
- | collab
- | seealsoie
- | primary
- | glossterm
- | termdef
- | area
- | ackno
- | function
- | collabname
- | lineannotation
- | guisubmenu
- | msgexplan
- | errorname
- | property
- | synopfragmentref
- | refentryinfo
- | entry
- | manvolnum
- | synopsis
- | emphasis
- | appendix
- | bookinfo
- | contrib
- | otheraddr
- | copyright
- | methodname
- | email
- | ooclass
- | videoobject
- | abstract
- | firstname
- | revremark
- | glossdef
- | guibutton
- | informalexample
- | screen
- | errorcode
- | command
- | seriesvolnums
- | refpurpose
- | parameter
- | equation
- | tfoot
- | code
- | jobtitle
- | sgmltag
- | screenco
- | holder
- | isbn
- | corpcredit
- | biblioset
- | part
- | symbol
- | row
- | bibliomisc
- | imagedata
- | secondary
- | classname
- | callout
- | screenshot
- | bibliomset
- | indexterm
- | refsect3
- | tocchap
- | para
- | refsect2
- | refsect1
- | date
- | refdescriptor
- | wordasword
- | epigraph
- | audiodata
- | hardware
- | confsponsor
- | authorgroup
- | warning
- | authorinitials
- | medialabel
- | varlistentry
- | authorblurb
- | itermset
- | refsect3info
- | informaltable
- | guimenuitem
- | postcode
- | subjectterm
- | refnamediv
- | note
- | figure
- | envar
- | listitem
- | methodsynopsis
- | affiliation
- | funcsynopsisinfo
- | structfield
- | blockquote
- | keyword
- | chapterinfo
- | tertiary
- | year
- | subtitle
- | personblurb
- | refentry
- | citebiblioid
- | seglistitem
- | bibliography
- | msg
- | constructorsynopsis
- | refsect2info
- | volumenum
- | database
- | funcdef
- | uri
- | graphicco
- | biblioid
- | msgmain
- | printhistory
- | glosssee
- | beginpage
- | glossary
- | set
- | highlights
- | objectinfo
- | tocpart
- | guiicon
- | revhistory
- | seg
- | see
- | msgorig
- | areaspec
- | partinfo
- | index
- | sectioninfo
- | refsectioninfo
- | optional
- | confnum
- | replaceable
- | refsect1info
- | corpauthor
- | step
- | anchor
- | arg
- | mathphrase
- | setindexinfo
- | keycombo
- | address
- | cmdsynopsis
- | computeroutput
- | literallayout
- | qandaentry
- | sect5info
- | bibliocoverage
- | coref
- | editor
- | superscript
- | personname
- | pubsnumber
- | graphic
- | simplesect
- | accel
- | secondaryie
- | biblioref
- | publishername
- | bibliorelation
- | prefaceinfo
- | revision
- | screeninfo
- | sbr
- | example
- | citetitle
- | issn
- | invpartnumber
- | indexdiv
- | sect4info
- | corpname
- | lineage
- | ooexception
- | reference
- | revdescription
- | title
- | edition
- | co
- | msgaud
- | guimenu
- | shortaffil
- | titleabbrev
- | msginfo
- | refmeta
- | qandadiv
- | mediaobjectco
- | seealso
- | exceptionname
- | answer
- | programlisting
- | tgroup
- | refentrytitle
- | book
- | errortext
- | varargs
- | sect3info
- | citerefentry
- | tasksummary
- | quote
- | othername
- | prompt
- | entrytbl
- | interfacename
- | acronym
- | modespec
- | msgset
- | thead
- | textdata
- | userinput
- | attribution
- | footnoteref
- | action
- | tocentry
- | tocfront
- | author
- | imageobjectco
- | alt
- | question
- | ulink
- | subject
- | pubdate
- | returnvalue
- | label
- | caution
- | section
- | systemitem
- | referenceinfo
- | sect2info
- | calloutlist
- | classsynopsis
- | productname
- | simpara
- | synopfragment
- | important
- | interface
- | releaseinfo
- | formalpara
- | areaset
- | biblioentry
- | indexinfo
- | guilabel
-# ......................................................................
-
-# Other general entities ...............................................
-
-# End of DocBook XML DTD V4.5 ..........................................
-
-# ......................................................................
diff --git a/defensive-coding/docbook-schema/.svn/text-base/htmltblx.rnc.svn-base
b/defensive-coding/docbook-schema/.svn/text-base/htmltblx.rnc.svn-base
deleted file mode 100644
index 7e15972..0000000
--- a/defensive-coding/docbook-schema/.svn/text-base/htmltblx.rnc.svn-base
+++ /dev/null
@@ -1,225 +0,0 @@
-# ......................................................................
-
-# DocBook XML HTML Table Module V4.5 ...................................
-
-# File htmltblx.mod ....................................................
-
-# Copyright 2003-2006 ArborText, Inc., Norman Walsh, Sun Microsystems,
-# Inc., and the Organization for the Advancement of Structured Information
-# Standards (OASIS).
-#
-# $Id: htmltblx.mod 6340 2006-10-03 13:23:24Z nwalsh $
-#
-# Permission to use, copy, modify and distribute the DocBook XML DTD
-# and its accompanying documentation for any purpose and without fee
-# is hereby granted in perpetuity, provided that the above copyright
-# notice and this paragraph appear in all copies. The copyright
-# holders make no representation about the suitability of the DTD for
-# any purpose. It is provided "as is" without expressed or implied
-# warranty.
-#
-# If you modify the DocBook XML DTD in any way, except for declaring and
-# referencing additional sets of general entities and declaring
-# additional notations, label your DTD as a variant of DocBook. See
-# the maintenance documentation for more information.
-#
-# Please direct all questions, bug reports, or suggestions for
-# changes to the docbook(a)lists.oasis-open.org mailing list. For more
-# information, see
http://www.oasis-open.org/docbook/.
-
-# ......................................................................
-
-# This module contains the definitions for elements that are
-# isomorphic to the HTML elements. One could argue we should
-# instead have based ourselves on the XHTML Table Module, but the
-# HTML one is more like what browsers are likely to accept today
-# and users are likely to use.
-#
-# This module has been developed for use with the DocBook V4.5
-# "union table model" in which elements and attlists common to both
-# models are defined (as the union) in the CALS table module by
-# setting various parameter entities appropriately in this file.
-#
-# In DTD driver files referring to this module, please use an entity
-# declaration that uses the public identifier shown below:
-#
-# <!ENTITY % htmltbl PUBLIC
-# "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN"
-# "htmltblx.mod">
-# %htmltbl;
-#
-# See the documentation for detailed information on the parameter
-# entity and module scheme used in DocBook, customizing DocBook and
-# planning for interchange, and changes made since the last release
-# of DocBook.
-
-# ======================= XHTML Tables =======================================
-
-namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
-
-html.coreattrs =
- common.attrib,
- attribute class { text }?,
- attribute style { text }?,
- attribute title { text }?
-# Does not contain lang or dir because they are in %common.attribs
-i18n = attribute xml:lang { xsd:NMTOKEN }?
-events =
- attribute onclick { text }?,
- attribute ondblclick { text }?,
- attribute onmousedown { text }?,
- attribute onmouseup { text }?,
- attribute onmouseover { text }?,
- attribute onmousemove { text }?,
- attribute onmouseout { text }?,
- attribute onkeypress { text }?,
- attribute onkeydown { text }?,
- attribute onkeyup { text }?
-attrs = html.coreattrs, i18n, events
-cellhalign =
- attribute align { "left" | "center" | "right" |
"justify" | "char" }?,
- attribute char { text }?,
- attribute charoff { text }?
-cellvalign =
- attribute valign { "top" | "middle" | "bottom" |
"baseline" }?
-# doc:A group of columns in an HTML table.
-colgroup = element colgroup { colgroup.attlist, col* }
-# doc:Specifications for a column in an HTML table.
-col = element col { col.attlist, empty }
-# doc:A row in an HTML table.
-tr = element tr { tr.attlist, (th | td)+ }
-# doc:A table header entry in an HTML table.
-th =
- element th {
- th.attlist, (para.char.mix | tabentry.mix | table | informaltable)*
- }
-# doc:A table ntry in an HTML table.
-td =
- element td {
- td.attlist, (para.char.mix | tabentry.mix | table | informaltable)*
- }
-colgroup.attlist &=
- attrs,
- [ a:defaultValue = "1" ] attribute span { text }?,
- attribute width { text }?,
- cellhalign,
- cellvalign
-col.attlist &=
- attrs,
- [ a:defaultValue = "1" ] attribute span { text }?,
- attribute width { text }?,
- cellhalign,
- cellvalign
-tr.attlist &=
- attrs,
- cellhalign,
- cellvalign,
- attribute bgcolor { text }?
-th.attlist &=
- attrs,
- attribute abbr { text }?,
- attribute axis { text }?,
- attribute headers { xsd:IDREFS }?,
- attribute scope { "row" | "col" | "rowgroup" |
"colgroup" }?,
- [ a:defaultValue = "1" ] attribute rowspan { text }?,
- [ a:defaultValue = "1" ] attribute colspan { text }?,
- cellhalign,
- cellvalign,
- attribute nowrap { "nowrap" }?,
- attribute bgcolor { text }?,
- attribute width { text }?,
- attribute height { text }?
-td.attlist &=
- attrs,
- attribute abbr { text }?,
- attribute axis { text }?,
- attribute headers { xsd:IDREFS }?,
- attribute scope { "row" | "col" | "rowgroup" |
"colgroup" }?,
- [ a:defaultValue = "1" ] attribute rowspan { text }?,
- [ a:defaultValue = "1" ] attribute colspan { text }?,
- cellhalign,
- cellvalign,
- attribute nowrap { "nowrap" }?,
- attribute bgcolor { text }?,
- attribute width { text }?,
- attribute height { text }?
-# ======================================================
-
-# Set up to read in the CALS model configured to
-# merge with the XHTML table model
-
-# ======================================================
-tables.role.attrib = role.attrib
-# Add label and role attributes to table and informaltable
-bodyatt =
- attribute floatstyle { text }?,
- attribute rowheader { "firstcol" | "norowheader" }?,
- label.attrib
-# Add common attributes to Table, TGroup, TBody, THead, TFoot, Row,
-# EntryTbl, and Entry (and InformalTable element).
-secur =
- common.attrib,
- attribute class { text }?,
- attribute style { text }?,
- attribute title { text }?,
- i18n,
- events,
- tables.role.attrib
-common.table.attribs = bodyatt, secur
-# Content model for Table (that also allows HTML tables)
-tbl.table.mdl =
- (blockinfo?,
- formalobject.title.content,
- ndxterm.class*,
- textobject*,
- (graphic+ | mediaobject+ | tgroup+))
- | (caption, (col* | colgroup*), thead?, tfoot?, (tbody+ | tr+))
-informal.tbl.table.mdl =
- (textobject*, (graphic+ | mediaobject+ | tgroup+))
- | ((col* | colgroup*), thead?, tfoot?, (tbody+ | tr+))
-# Attributes for Table (including HTML ones)
-
-# N.B. rules = (none | groups | rows | cols | all) but it can't be spec'd
-
-# that way because 'all' already occurs in a different enumeration in
-
-# CALS tables (frame).
-tbl.table.att =
- attribute tabstyle { text }?,
- attribute tocentry { yesorno.attvals }?,
- attribute shortentry { yesorno.attvals }?,
- attribute orient { "port" | "land" }?,
- attribute pgwide { yesorno.attvals }?,
- attribute summary { text }?,
- attribute width { text }?,
- attribute border { text }?,
- attribute rules { text }?,
- attribute cellspacing { text }?,
- attribute cellpadding { text }?,
- attribute align { "left" | "center" | "right" }?,
- attribute bgcolor { text }?
-tbl.frame.attval =
- "void"
- | "above"
- | "below"
- | "hsides"
- | "lhs"
- | "rhs"
- | "vsides"
- | "box"
- | "border"
- | "top"
- | "bottom"
- | "topbot"
- | "all"
- | "sides"
- | "none"
-# Allow either objects or inlines; beware of REs between elements.
-tbl.entry.mdl = para.char.mix | tabentry.mix
-# thead, tfoot, and tbody are defined in both table models,
-# so we set up parameter entities to define union models for them
-tbl.hdft.mdl = tr+ | (colspec*, row+)
-tbl.tbody.mdl = tr+ | row+
-# End of DocBook XML HTML Table Module V4.5 ............................
-
-# ......................................................................
diff --git a/defensive-coding/en-US/.svn/all-wcprops
b/defensive-coding/en-US/.svn/all-wcprops
deleted file mode 100644
index 3d941d7..0000000
--- a/defensive-coding/en-US/.svn/all-wcprops
+++ /dev/null
@@ -1,23 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 65
-/repos/product-security/!svn/ver/302/defensive-coding/trunk/en-US
-END
-Defensive_Coding.ent
-K 25
-svn:wc:ra_dav:version-url
-V 85
-/repos/product-security/!svn/ver/64/defensive-coding/trunk/en-US/Defensive_Coding.ent
-END
-Book_Info.xml
-K 25
-svn:wc:ra_dav:version-url
-V 79
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Book_Info.xml
-END
-Defensive_Coding.xml
-K 25
-svn:wc:ra_dav:version-url
-V 86
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Defensive_Coding.xml
-END
diff --git a/defensive-coding/en-US/.svn/entries b/defensive-coding/en-US/.svn/entries
deleted file mode 100644
index c3aaf37..0000000
--- a/defensive-coding/en-US/.svn/entries
+++ /dev/null
@@ -1,145 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/en-US
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2013-01-16T14:32:22.318444Z
-302
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-Defensive_Coding.ent
-file
-
-
-
-
-2013-01-10T17:17:49.038814Z
-240837ebc2948c0404c903c2b25ee90a
-2012-07-16T12:32:39.042163Z
-64
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-54
-
-Python
-dir
-
-C
-dir
-
-CXX
-dir
-
-Book_Info.xml
-file
-
-
-
-
-2013-01-10T17:17:49.038814Z
-0a9c514a2db8c6783b91a20eea2918c2
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-999
-
-Tasks
-dir
-
-Defensive_Coding.xml
-file
-
-
-
-
-2013-01-10T17:17:49.038814Z
-81327d12a4be4bc9189fbd3eea5c5215
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1522
-
-Features
-dir
-
diff --git a/defensive-coding/en-US/.svn/prop-base/Book_Info.xml.svn-base
b/defensive-coding/en-US/.svn/prop-base/Book_Info.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/.svn/prop-base/Book_Info.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/.svn/prop-base/Defensive_Coding.xml.svn-base
b/defensive-coding/en-US/.svn/prop-base/Defensive_Coding.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/.svn/prop-base/Defensive_Coding.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/.svn/text-base/Book_Info.xml.svn-base
b/defensive-coding/en-US/.svn/text-base/Book_Info.xml.svn-base
deleted file mode 100644
index f51a71c..0000000
--- a/defensive-coding/en-US/.svn/text-base/Book_Info.xml.svn-base
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<bookinfo id="book-Defensive_Coding">
- <title>Defensive Coding</title>
- <subtitle>A Guide to Improving Software Security</subtitle>
- <edition>1.0</edition>
- <issuenum>1.0</issuenum>
- <pubsnumber>20</pubsnumber>
- <productname>Internal</productname>
- <productnumber>6.4</productnumber>
- <abstract>
- <para>
- This document provides guidelines for improving software
- security through secure coding. It covers common
- programming languages and libraries, and focuses on
- concrete recommendations.
- </para>
- </abstract>
- <corpauthor>
- <inlinemediaobject>
- <imageobject>
- <imagedata fileref="Common_Content/images/redhat-logo.svg"
format="SVG" />
- </imageobject>
- </inlinemediaobject>
- </corpauthor>
- <xi:include href="Common_Content/Legal_Notice.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</bookinfo>
-
diff --git a/defensive-coding/en-US/.svn/text-base/Defensive_Coding.ent.svn-base
b/defensive-coding/en-US/.svn/text-base/Defensive_Coding.ent.svn-base
deleted file mode 100644
index 0bf84b7..0000000
--- a/defensive-coding/en-US/.svn/text-base/Defensive_Coding.ent.svn-base
+++ /dev/null
@@ -1,2 +0,0 @@
-<!ENTITY YEAR "2012">
-<!ENTITY HOLDER "Red Hat, Inc">
diff --git a/defensive-coding/en-US/.svn/text-base/Defensive_Coding.xml.svn-base
b/defensive-coding/en-US/.svn/text-base/Defensive_Coding.xml.svn-base
deleted file mode 100644
index 5fcc6eb..0000000
--- a/defensive-coding/en-US/.svn/text-base/Defensive_Coding.xml.svn-base
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<book>
- <xi:include href="Book_Info.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <part>
- <title>Programming Languages</title>
- <xi:include href="C/C.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="CXX/CXX.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Python/Language.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </part>
- <part>
- <title>Specific Programming Tasks</title>
- <xi:include href="Tasks/Library_Design.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Tasks/Descriptors.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Tasks/File_System.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Tasks/Temporary_Files.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Tasks/Processes.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Tasks/Serialization.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Tasks/Cryptography.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </part>
- <part>
- <title>Implementing Security Features</title>
- <xi:include href="Features/Authentication.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Features/TLS.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </part>
-</book>
diff --git a/defensive-coding/en-US/C/.svn/all-wcprops
b/defensive-coding/en-US/C/.svn/all-wcprops
deleted file mode 100644
index d8e8e2f..0000000
--- a/defensive-coding/en-US/C/.svn/all-wcprops
+++ /dev/null
@@ -1,35 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 67
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/C
-END
-C.xml
-K 25
-svn:wc:ra_dav:version-url
-V 73
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/C/C.xml
-END
-Allocators.xml
-K 25
-svn:wc:ra_dav:version-url
-V 82
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/C/Allocators.xml
-END
-Language.xml
-K 25
-svn:wc:ra_dav:version-url
-V 80
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/C/Language.xml
-END
-schemas.xml
-K 25
-svn:wc:ra_dav:version-url
-V 79
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/C/schemas.xml
-END
-Libc.xml
-K 25
-svn:wc:ra_dav:version-url
-V 76
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/C/Libc.xml
-END
diff --git a/defensive-coding/en-US/C/.svn/dir-prop-base
b/defensive-coding/en-US/C/.svn/dir-prop-base
deleted file mode 100644
index b0e5252..0000000
--- a/defensive-coding/en-US/C/.svn/dir-prop-base
+++ /dev/null
@@ -1,6 +0,0 @@
-K 10
-svn:ignore
-V 9
-snippets
-
-END
diff --git a/defensive-coding/en-US/C/.svn/entries
b/defensive-coding/en-US/C/.svn/entries
deleted file mode 100644
index cfeb91c..0000000
--- a/defensive-coding/en-US/C/.svn/entries
+++ /dev/null
@@ -1,198 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/en-US/C
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-C.xml
-file
-
-
-
-
-2013-01-10T17:17:40.330763Z
-152059b0949055c27918169fb0406ee5
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-503
-
-Allocators.xml
-file
-
-
-
-
-2013-01-10T17:17:40.330763Z
-483d91643e7a6a8d6545649b2fa0b144
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-8762
-
-Language.xml
-file
-
-
-
-
-2013-01-10T17:17:40.330763Z
-11fb84b7e9a7c76cfc95dbe918118998
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-6528
-
-schemas.xml
-file
-
-
-
-
-2013-01-10T17:17:40.331763Z
-769bc2635d36b318161574a1adf2f6e7
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-150
-
-Libc.xml
-file
-
-
-
-
-2013-01-10T17:17:40.331763Z
-6e4999f743167fd393cbd521fd4d662c
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-8733
-
diff --git a/defensive-coding/en-US/C/.svn/prop-base/Allocators.xml.svn-base
b/defensive-coding/en-US/C/.svn/prop-base/Allocators.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/C/.svn/prop-base/Allocators.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/C/.svn/prop-base/C.xml.svn-base
b/defensive-coding/en-US/C/.svn/prop-base/C.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/C/.svn/prop-base/C.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/C/.svn/prop-base/Language.xml.svn-base
b/defensive-coding/en-US/C/.svn/prop-base/Language.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/C/.svn/prop-base/Language.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/C/.svn/prop-base/Libc.xml.svn-base
b/defensive-coding/en-US/C/.svn/prop-base/Libc.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/C/.svn/prop-base/Libc.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/C/.svn/prop-base/schemas.xml.svn-base
b/defensive-coding/en-US/C/.svn/prop-base/schemas.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/C/.svn/prop-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/C/.svn/text-base/Allocators.xml.svn-base
b/defensive-coding/en-US/C/.svn/text-base/Allocators.xml.svn-base
deleted file mode 100644
index 974b6c1..0000000
--- a/defensive-coding/en-US/C/.svn/text-base/Allocators.xml.svn-base
+++ /dev/null
@@ -1,207 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<section id="sect-Defensive_Coding-C-Allocators">
- <title>Memory allocators</title>
-
- <section>
- <title><function>malloc</function> and related
functions</title>
- <para>
- The C library interfaces for memory allocation are provided by
- <function>malloc</function>, <function>free</function> and
- <function>realloc</function>, and the
- <function>calloc</function> function. In addition to these
- generic functions, there are derived functions such as
- <function>strdup</function> which perform allocation using
- <function>malloc</function> internally, but do not return
- untyped heap memory (which could be used for any object).
- </para>
- <para>
- The C compiler knows about these functions and can use their
- expected behavior for optimizations. For instance, the compiler
- assumes that an existing pointer (or a pointer derived from an
- existing pointer by arithmetic) will not point into the memory
- area returned by <function>malloc</function>.
- </para>
- <para>
- If the allocation fails, <function>realloc</function> does not
- free the old pointer. Therefore, the idiom <literal>ptr =
- realloc(ptr, size);</literal> is wrong because the memory
- pointed to by <literal>ptr</literal> leaks in case of an error.
- </para>
- <section>
- <title>Use-after-free errors</title>
- <para>
- After <function>free</function>, the pointer is invalid.
- Further pointer dereferences are not allowed (and are usually
- detected by <application>valgrind</application>). Less obvious
- is that any <emphasis>use</emphasis> of the old pointer value is
- not allowed, either. In particular, comparisons with any other
- pointer (or the null pointer) are undefined according to the C
- standard.
- </para>
- <para>
- The same rules apply to <function>realloc</function> if the
- memory area cannot be enlarged in-place. For instance, the
- compiler may assume that a comparison between the old and new
- pointer will always return false, so it is impossible to detect
- movement this way.
- </para>
- </section>
- <section>
- <title>Handling memory allocation errors</title>
- <para>
- Recovering from out-of-memory errors is often difficult or even
- impossible. In these cases, <function>malloc</function> and
- other allocation functions return a null pointer. Dereferencing
- this pointer lead to a crash. Such dereferences can even be
- exploitable for code execution if the dereference is combined
- with an array subscript.
- </para>
- <para>
- In general, if you cannot check all allocation calls and
- handle failure, you should abort the program on allocation
- failure, and not rely on the null pointer dereference to
- terminate the process. See
- <xref
- linkend="sect-Defensive_Coding-Tasks-Serialization-Decoders"/>
- for related memory allocation concerns.
- </para>
- </section>
- </section>
-
- <section id="sect-Defensive_Coding-C-Allocators-alloca">
- <title><function>alloca</function> and other forms of stack-based
- allocation</title>
- <para>
- Allocation on the stack is risky because stack overflow checking
- is implicit. There is a guard page at the end of the memory
- area reserved for the stack. If the program attempts to read
- from or write to this guard page, a <literal>SIGSEGV</literal>
- signal is generated and the program typically terminates.
- </para>
- <para>
- This is sufficient for detecting typical stack overflow
- situations such as unbounded recursion, but it fails when the
- stack grows in increments larger than the size of the guard
- page. In this case, it is possible that the stack pointer ends
- up pointing into a memory area which has been allocated for a
- different purposes. Such misbehavior can be exploitable.
- </para>
- <para>
- A common source for large stack growth are calls to
- <function>alloca</function> and related functions such as
- <function>strdupa</function>. These functions should be avoided
- because of the lack of error checking. (They can be used safely
- if the allocated size is less than the page size (typically,
- 4096 bytes), but this case is relatively rare.) Additionally,
- relying on <function>alloca</function> makes it more difficult
- to reorgnize the code because it is not allowed to use the
- pointer after the function calling <function>alloca</function>
- has returned, even if this function has been inlined into its
- caller.
- </para>
- <para>
- Similar concerns apply to <emphasis>variable-length
- arrays</emphasis> (VLAs), a feature of the C99 standard which
- started as a GNU extension. For large objects exceeding the
- page size, there is no error checking, either.
- </para>
- <para>
- In both cases, negative or very large sizes can trigger a
- stack-pointer wraparound, and the stack pointer and end up
- pointing into caller stack frames, which is fatal and can be
- exploitable.
- </para>
- <para>
- If you want to use <function>alloca</function> or VLAs for
- performance reasons, consider using a small on-stack array (less
- than the page size, large enough to fulfill most requests). If
- the requested size is small enough, use the on-stack array.
- Otherwise, call <function>malloc</function>. When exiting the
- function, check if <function>malloc</function> had been called,
- and free the buffer as needed.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-C-Allocators-Arrays">
- <title>Array allocation</title>
- <para>
- When allocating arrays, it is important to check for overflows.
- The <function>calloc</function> function performs such checks.
- </para>
- <para>
- If <function>malloc</function> or
<function>realloc</function>
- is used, the size check must be written manually. For instance,
- to allocate an array of <literal>n</literal> elements of type
- <literal>T</literal>, check that the requested size is not
- greater than <literal>n / sizeof(T)</literal>.
- </para>
- </section>
-
- <section>
- <title>Custom memory allocators</title>
- <para>
- Custom memory allocates come in two forms: replacements for
- <function>malloc</function>, and completely different interfaces
- for memory management. Both approaches can reduce the
- effectiveness of <application>valgrind</application> and similar
- tools, and the heap corruption detection provided by GNU libc, so
- they should be avoided.
- </para>
- <para>
- Memory allocators are difficult to write and contain many
- performance and security pitfalls.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- When computing array sizes or rounding up allocation
- requests (to the next allocation granularity, or for
- alignment purposes), checks for arithmetic overflow are
- required.
- </para>
- </listitem>
- <listitem>
- <para>
- Size computations for array allocations need overflow
- checking. See <xref
- linkend="sect-Defensive_Coding-C-Allocators-Arrays"/>.
- </para>
- </listitem>
- <listitem>
- <para>
- It can be difficult to beat well-tuned general-purpose
- allocators. In micro-benchmarks, pool allocators can show
- huge wins, and size-specific pools can reduce internal
- fragmentation. But often, utilization of individual pools
- is poor, and
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section>
- <title>Conservative garbage collection</title>
- <para>
- Garbage collection can be an alternative to explicit memory
- management using <function>malloc</function> and
- <function>free</function>. The Boehm-Dehmers-Weiser allocator
- can be used from C programs, with minimal type annotations.
- Performance is competitive with <function>malloc</function> on
- 64-bit architectures, especially for multi-threaded programs.
- The stop-the-world pauses may be problematic for some real-time
- applications, though.
- </para>
- <para>
- However, using a conservative garbage collector may reduce
- opertunities for code reduce because once one library in a
- program uses garbage collection, the whole process memory needs
- to be subject to it, so that no pointers are missed. The
- Boehm-Dehmers-Weiser collector also reserves certain signals for
- internal use, so it is not fully transparent to the rest of the
- program.
- </para>
- </section>
-</section>
-
diff --git a/defensive-coding/en-US/C/.svn/text-base/C.xml.svn-base
b/defensive-coding/en-US/C/.svn/text-base/C.xml.svn-base
deleted file mode 100644
index 3dd659a..0000000
--- a/defensive-coding/en-US/C/.svn/text-base/C.xml.svn-base
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-C">
- <title>The C Programming Language</title>
-
- <xi:include href="Language.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Libc.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Allocators.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</chapter>
-
diff --git a/defensive-coding/en-US/C/.svn/text-base/Language.xml.svn-base
b/defensive-coding/en-US/C/.svn/text-base/Language.xml.svn-base
deleted file mode 100644
index db7cc5d..0000000
--- a/defensive-coding/en-US/C/.svn/text-base/Language.xml.svn-base
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<section id="sect-Defensive_Coding-C-Language">
- <title>The core language</title>
- <para>
- C provides no memory safety. Most recommendations in this section
- deal with this aspect of the language.
- </para>
-
- <section id="sect-Defensive_Coding-C-Undefined">
- <title>Undefined behavior</title>
- <para>
- Some C constructs are defined to be undefined by the C standard.
- This does not only mean that the standard does not describe
- what happens when the construct is executed. It also allows
- optimizing compilers such as GCC to assume that this particular
- construct is never reached. In some cases, this has caused
- GCC to optimize security checks away. (This is not a flaw in GCC
- or the C language. But C certainly has some areas which are more
- difficult to use than others.)
- </para>
-
- <para>
- Common sources of undefined behavior are:
- </para>
- <itemizedlist>
- <listitem><para>out-of-bounds array
accesses</para></listitem>
- <listitem><para>null pointer
dereferences</para></listitem>
- <listitem><para>overflow in signed integer
arithmetic</para></listitem>
- </itemizedlist>
- </section>
-
- <section id="sect-Defensive_Coding-C-Pointers">
- <title>Recommendations for pointers and array handling</title>
- <para>
- Always keep track of the size of the array you are working with.
- Often, code is more obviously correct when you keep a pointer
- past the last element of the array, and calculate the number of
- remaining elements by substracting the current position from
- that pointer. The alternative, updating a separate variable
- every time when the position is advanced, is usually less
- obviously correct.
- </para>
- <para>
- <xref linkend="ex-Defensive_Coding-C-Pointers-remaining"/>
- shows how to extract Pascal-style strings from a character
- buffer. The two pointers kept for length checks are
- <varname>inend</varname> and <varname>outend</varname>.
- <varname>inp</varname> and <varname>outp</varname> are the
- respective positions.
- The number of input bytes is checked using the expression
- <literal>len > (size_t)(inend - inp)</literal>.
- The cast silences a compiler warning;
- <varname>inend</varname> is always larger than
- <varname>inp</varname>.
- </para>
- <example id="ex-Defensive_Coding-C-Pointers-remaining">
- <title>Array processing in C</title>
- <xi:include href="snippets/Pointers-remaining.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- It is important that the length checks always have the form
- <literal>len > (size_t)(inend - inp)</literal>, where
- <varname>len</varname> is a variable of type
- <type>size_t</type> which denotes the
<emphasis>total</emphasis>
- number of bytes which are about to be read or written next. In
- general, it is not safe to fold multiple such checks into one,
- as in <literal>len1 + len2 > (size_t)(inend - inp)</literal>,
- because the expression on the left can overflow or wrap around
- (see <xref linkend="sect-Defensive_Coding-C-Arithmetic"/>), and it
- no longer reflects the number of bytes to be processed.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-C-Arithmetic">
- <title>Recommendations for integer arithmetic</title>
- <para>
- Overflow in signed integer arithmetic is undefined. This means
- that it is not possible to check for overflow after it happened,
- see <xref linkend="ex-Defensive_Coding-C-Arithmetic-bad"/>.
- </para>
- <example id="ex-Defensive_Coding-C-Arithmetic-bad">
- <title>Incorrect overflow detection in C</title>
- <xi:include href="snippets/Arithmetic-add.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- The following approaches can be used to check for overflow,
- without actually causing it.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Use a wider type to perform the calculation, check that the
- result is within bounds, and convert the result to the
- original type. All intermediate results must be checked in
- this way.
- </para>
- </listitem>
- <listitem>
- <para>
- Perform the calculation in the corresponding unsigned type
- and use bit fiddling to detect the overflow.
- </para>
- </listitem>
- <listitem>
- <para>
- Compute bounds for acceptable input values which are known
- to avoid overflow, and reject other values. This is the
- preferred way for overflow checking on multiplications,
- see <xref linkend="ex-Defensive_Coding-C-Arithmetic-mult"/>.
- <!-- This approach can result in bogus compiler warnings
- with signed types:
-
http://gcc.gnu.org/bugzilla/post_bug.cgi -->
- </para>
- </listitem>
- </itemizedlist>
- <example id="ex-Defensive_Coding-C-Arithmetic-mult">
- <title>Overflow checking for unsigned multiplication</title>
- <xi:include href="snippets/Arithmetic-mult.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- Basic arithmetic operations a commutative, so for bounds checks,
- there are two different but mathematically equivalent
- expressions. Sometimes, one of the expressions results in
- better code because parts of it can be reduced to a constant.
- This applies to overflow checks for multiplication <literal>a *
- b</literal> involving a constant <literal>a</literal>, where the
- expression is reduced to <literal>b > C</literal> for some
- constant <literal>C</literal> determined at compile time. The
- other expression, <literal>b && a > ((unsigned)-1) /
- b</literal>, is more difficult to optimize at compile time.
- </para>
- <para>
- When a value is converted to a signed integer, GCC always
- chooses the result based on 2's complement arithmetic. This GCC
- extension (which is also implemented by other compilers) helps a
- lot when implementing overflow checks.
- </para>
- <para>
- Legacy code should be compiled with the <option>-fwrapv</option>
- GCC option. As a result, GCC will provide 2's complement
- semantics for integer arithmetic, including defined behavior on
- integer overflow.
- </para>
- </section>
-</section>
diff --git a/defensive-coding/en-US/C/.svn/text-base/Libc.xml.svn-base
b/defensive-coding/en-US/C/.svn/text-base/Libc.xml.svn-base
deleted file mode 100644
index 6173bf0..0000000
--- a/defensive-coding/en-US/C/.svn/text-base/Libc.xml.svn-base
+++ /dev/null
@@ -1,227 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<section id="sect-Defensive_Coding-C-Libc">
- <title>The C standard library</title>
- <para>
- Parts of the C standard library (and the UNIX and GNU extensions)
- are difficult to use, so you shoud avoid them.
- </para>
- <para>
- Please check the applicable documentation before using the
- recommended replacements. Many of these functions allocate
- buffers using <function>malloc</function> which your code must
- deallocate explicitly using <function>free</function>.
- </para>
- <section id="sect-Defensive_Coding-C-Absolutely-Banned">
- <title>Absolutely banned interfaces</title>
- <para>
- The functions listed below must not be used because they are
- almost always unsafe. Use the indicated replacements instead.
- </para>
- <itemizedlist>
- <listitem><para><function>gets</function>
- ⟶ <function>fgets</function></para></listitem>
- <listitem><para><function>getwd</function>
- ⟶ <function>getcwd</function>
- or
<function>get_current_dir_name</function></para></listitem>
- <listitem>
- <para>
- <function>readdir_r</function> ⟶ <function>readdir</function>
- <!-- It is quite complicated to allocate a properly-sized
- buffer for use with readdir_r, and readdir provides
- sufficient thread safety guarantees. -->
- <!-- ??? Add File_System cross-reference -->
- </para>
- </listitem>
- <listitem>
- <para>
- <function>realpath</function> (with a non-NULL second parameter)
- ⟶ <function>realpath</function> with NULL as the second parameter,
- or <function>canonicalize_file_name</function>
- <!-- It is complicated to allocate a properly-sized buffer
- for use with realpath. -->
- <!-- ??? Add File_System cross-reference -->
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The constants listed below must not be used, either. Instead,
- code must allocate memory dynamically and use interfaces with
- length checking.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>NAME_MAX</literal> (limit not actually enforced by
- the kernel)
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>PATH_MAX</literal> (limit not actually enforced by
- the kernel)
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>_PC_NAME_MAX</literal> (This limit, returned by the
- <function>pathconf</function> function, is not enforced by
- the kernel.)
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>_PC_PATH_MAX</literal> (This limit, returned by the
- <function>pathconf</function> function, is not enforced by
- the kernel.)
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The following structure members must not be used.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>f_namemax</literal> in <literal>struct
- statvfs</literal> (limit not actually enforced by the kernel,
- see <literal>_PC_NAME_MAX</literal> above)
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="sect-Defensive_Coding-C-Avoid">
- <title>Functions to avoid</title>
- <para>
- The following string manipulation functions can be used securely
- in principle, but their use should be avoided because they are
- difficult to use correctly. Calls to these functions can be
- replaced with <function>asprintf</function> or
- <function>vasprintf</function>. (For non-GNU targets, these
- functions are available from Gnulib.) In some cases, the
- <function>snprintf</function> function might be a suitable
- replacement, see <xref
- linkend="sect-Defensive_Coding-C-String-Functions-Length"/>.
- </para>
- <itemizedlist>
-
<listitem><para><function>sprintf</function></para></listitem>
-
<listitem><para><function>strcat</function></para></listitem>
-
<listitem><para><function>strcpy</function></para></listitem>
-
<listitem><para><function>vsprintf</function></para></listitem>
- </itemizedlist>
- <para>
- Use the indicated replacements for the functions below.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <function>alloca</function> ⟶
- <function>malloc</function> and <function>free</function>
- (see <xref linkend="sect-Defensive_Coding-C-Allocators-alloca"/>)
- </para>
- </listitem>
- <listitem>
- <para>
- <function>putenv</function> ⟶
- explicit <varname>envp</varname> argument in process creation
- (see <xref linkend="sect-Defensive_Coding-Tasks-Processes-environ"/>)
- </para>
- </listitem>
- <listitem>
- <para>
- <function>setenv</function> ⟶
- explicit <varname>envp</varname> argument in process creation
- (see <xref linkend="sect-Defensive_Coding-Tasks-Processes-environ"/>)
- </para>
- </listitem>
- <listitem>
- <para>
- <function>strdupa</function> ⟶
- <function>strdup</function> and <function>free</function>
- (see <xref linkend="sect-Defensive_Coding-C-Allocators-alloca"/>)
- </para>
- </listitem>
- <listitem>
- <para>
- <function>strndupa</function> ⟶
- <function>strndup</function> and <function>free</function>
- (see <xref linkend="sect-Defensive_Coding-C-Allocators-alloca"/>)
- </para>
- </listitem>
- <listitem>
- <para>
- <function>system</function> ⟶
- <function>posix_spawn</function>
- or <function>fork</function>/<function>execve</function>/
- (see <xref linkend="sect-Defensive_Coding-Tasks-Processes-execve"/>)
- </para>
- </listitem>
- <listitem>
- <para>
- <function>unsetenv</function> ⟶
- explicit <varname>envp</varname> argument in process creation
- (see <xref linkend="sect-Defensive_Coding-Tasks-Processes-environ"/>)
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="sect-Defensive_Coding-C-String-Functions-Length">
- <title>String Functions With Explicit Length Arguments</title>
- <para>
- The <function>snprintf</function> function provides a way to
- construct a string in a statically-sized buffer. (If the buffer
- size is dynamic, use <function>asprintf</function> instead.)
- </para>
- <informalexample>
- <xi:include href="snippets/String-Functions-snprintf.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- The second argument to the <function>snprintf</function> should
- always be the size of the buffer in the first argument (which
- should be a character array). Complex pointer and length
- arithmetic can introduce errors and nullify the security
- benefits of <function>snprintf</function>. If you need to
- construct a string iteratively, by repeatedly appending
- fragments, consider constructing the string on the heap,
- increasing the buffer with <function>realloc</function> as
- needed. (<function>snprintf</function> does not support
- overlapping the result buffer with argument strings.)
- </para>
- <para>
- If you use <function>vsnprintf</function> (or
- <function>snprintf</function>) with a format string which is not
- a constant, but a function argument, it is important to annotate
- the function with a <literal>format</literal> function
- attribute, so that GCC can warn about misuse of your function
- (see <xref
- linkend="ex-Defensive_Coding-C-String-Functions-format-Attribute"/>).
- </para>
- <example
id="ex-Defensive_Coding-C-String-Functions-format-Attribute">
- <title>The <literal>format</literal> function
attribute</title>
- <xi:include href="snippets/String-Functions-format.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- There are other functions which operator on NUL-terminated
- strings and take a length argument which affects the number of
- bytes written to the destination: <function>strncpy</function>,
- <function>strncat</function>, and
<function>stpncpy</function>.
- These functions do not ensure that the result string is
- NUL-terminated. For <function>strncpy</function>,
- NUL termination can be added this way:
- </para>
- <informalexample>
- <xi:include href="snippets/String-Functions-strncpy.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- Some systems support <function>strlcpy</function> and
- <function>strlcat</function> functions which behave this way,
- but these functions are not part of GNU libc. Using
- <function>snprintf</function> with a suitable format string is a
- simple (albeit slightly slower) replacement.
- </para>
- </section>
-</section>
diff --git a/defensive-coding/en-US/C/.svn/text-base/schemas.xml.svn-base
b/defensive-coding/en-US/C/.svn/text-base/schemas.xml.svn-base
deleted file mode 100644
index 8e84245..0000000
--- a/defensive-coding/en-US/C/.svn/text-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<locatingRules
xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
- <include rules="../../schemas.xml"/>
-</locatingRules>
diff --git a/defensive-coding/en-US/CXX/.svn/all-wcprops
b/defensive-coding/en-US/CXX/.svn/all-wcprops
deleted file mode 100644
index 5011e3d..0000000
--- a/defensive-coding/en-US/CXX/.svn/all-wcprops
+++ /dev/null
@@ -1,29 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 69
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/CXX
-END
-CXX.xml
-K 25
-svn:wc:ra_dav:version-url
-V 77
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/CXX/CXX.xml
-END
-Language.xml
-K 25
-svn:wc:ra_dav:version-url
-V 82
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/CXX/Language.xml
-END
-schemas.xml
-K 25
-svn:wc:ra_dav:version-url
-V 81
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/CXX/schemas.xml
-END
-Std.xml
-K 25
-svn:wc:ra_dav:version-url
-V 77
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/CXX/Std.xml
-END
diff --git a/defensive-coding/en-US/CXX/.svn/dir-prop-base
b/defensive-coding/en-US/CXX/.svn/dir-prop-base
deleted file mode 100644
index b0e5252..0000000
--- a/defensive-coding/en-US/CXX/.svn/dir-prop-base
+++ /dev/null
@@ -1,6 +0,0 @@
-K 10
-svn:ignore
-V 9
-snippets
-
-END
diff --git a/defensive-coding/en-US/CXX/.svn/entries
b/defensive-coding/en-US/CXX/.svn/entries
deleted file mode 100644
index 20c613a..0000000
--- a/defensive-coding/en-US/CXX/.svn/entries
+++ /dev/null
@@ -1,164 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/en-US/CXX
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-CXX.xml
-file
-
-
-
-
-2013-01-10T17:17:40.360763Z
-b0f0bf8b20378408157b933ace95025b
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-419
-
-Language.xml
-file
-
-
-
-
-2013-01-10T17:17:40.361763Z
-0c223f5c8e653b24ad9ee512a9347ff6
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-7232
-
-schemas.xml
-file
-
-
-
-
-2013-01-10T17:17:40.361763Z
-769bc2635d36b318161574a1adf2f6e7
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-150
-
-Std.xml
-file
-
-
-
-
-2013-01-10T17:17:40.362763Z
-43d4998b7a340602a1cfb058cac483c9
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1392
-
diff --git a/defensive-coding/en-US/CXX/.svn/prop-base/CXX.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/prop-base/CXX.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/CXX/.svn/prop-base/CXX.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/CXX/.svn/prop-base/Language.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/prop-base/Language.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/CXX/.svn/prop-base/Language.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/CXX/.svn/prop-base/Std.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/prop-base/Std.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/CXX/.svn/prop-base/Std.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/CXX/.svn/prop-base/schemas.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/prop-base/schemas.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/CXX/.svn/prop-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/CXX/.svn/text-base/CXX.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/text-base/CXX.xml.svn-base
deleted file mode 100644
index fccfb75..0000000
--- a/defensive-coding/en-US/CXX/.svn/text-base/CXX.xml.svn-base
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-CXX">
- <title>The C++ Programming Language</title>
-
- <xi:include href="Language.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="Std.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-</chapter>
-
diff --git a/defensive-coding/en-US/CXX/.svn/text-base/Language.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/text-base/Language.xml.svn-base
deleted file mode 100644
index 9dbc4f3..0000000
--- a/defensive-coding/en-US/CXX/.svn/text-base/Language.xml.svn-base
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<section id="sect-Defensive_Coding-CXX-Language">
- <title>The core language</title>
- <para>
- C++ includes a large subset of the C language. As far as the C
- subset is used, the recommendations in <xref
- linkend="chap-Defensive_Coding-C"/> apply.
- </para>
-
- <section>
- <title>Array allocation with <literal>operator
new[]</literal></title>
- <para>
- For very large values of <literal>n</literal>, an expression
- like <literal>new T[n]</literal> can return a pointer to a heap
- region which is too small. In other words, not all array
- elements are actually backed with heap memory reserved to the
- array. Current GCC versions generate code that performs a
- computation of the form <literal>sizeof(T) * size_t(n) +
- cookie_size</literal>, where <literal>cookie_size</literal> is
- currently at most 8. This computation can overflow, and
- GCC-generated code does not detect this.
- </para>
- <para>
- The <literal>std::vector</literal> template can be used instead
- an explicit array allocation. (The GCC implementation detects
- overflow internally.)
- </para>
- <para>
- If there is no alternative to <literal>operator new[]</literal>,
- code which allocates arrays with a variable length must check
- for overflow manually. For the <literal>new T[n]</literal>
- example, the size check could be <literal>n || (n > 0 &&
- n > (size_t(-1) - 8) / sizeof(T))</literal>. (See <xref
- linkend="sect-Defensive_Coding-C-Arithmetic"/>.) If there are
- additional dimensions (which must be constants according to the
- C++ standard), these should be included as factors in the
- divisor.
- </para>
- <para>
- These countermeasures prevent out-of-bounds writes and potential
- code execution. Very large memory allocations can still lead to
- a denial of service. <xref
- linkend="sect-Defensive_Coding-Tasks-Serialization-Decoders"/>
- contains suggestions for mitigating this problem when processing
- untrusted data.
- </para>
- <para>
- See <xref linkend="sect-Defensive_Coding-C-Allocators-Arrays"/>
- for array allocation advice for C-style memory allocation.
- </para>
- </section>
-
- <section>
- <title>Overloading</title>
- <para>
- Do not overload functions with versions that have different
- security characteristics. For instance, do not implement a
- function <function>strcat</function> which works on
- <type>std::string</type> arguments. Similarly, do not name
- methods after such functions.
- </para>
- </section>
- <section>
- <title>ABI compatibility and preparing for security updates</title>
- <para>
- A stable binary interface (ABI) is vastly preferred for security
- updates. Without a stable ABI, all reverse dependencies need
- recompiling, which can be a lot of work and could even be
- impossible in some cases. Ideally, a security update only
- updates a single dynamic shared object, and is picked up
- automatically after restarting affected processes.
- </para>
- <para>
- Outside of extremely performance-critical code, you should
- ensure that a wide range of changes is possible without breaking
- ABI. Some very basic guidelines are:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Avoid inline functions.
- </para>
- </listitem>
- <listitem>
- <para>
- Use the pointer-to-implementation idiom.
- </para>
- </listitem>
- <listitem>
- <para>
- Try to avoid templates. Use them if the increased type
- safety provides a benefit to the programmer.
- </para>
- </listitem>
- <listitem>
- <para>
- Move security-critical code out of templated code, so that
- it can be patched in a central place if necessary.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The KDE project publishes a document with more extensive
- guidelines on ABI-preserving changes to C++ code, <ulink
-
url="http://techbase.kde.org/Policies/Binary_Compatibility_Issues_Wi...
- Compatibility Issues With C++</ulink>
- (<emphasis>d-pointer</emphasis> refers to the
- pointer-to-implementation idiom).
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-CXX-Language-CXX11">
- <title>C++0X and C++11 support</title>
- <para>
- GCC offers different language compatibility modes:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <option>-std=c++98</option> for the original 1998 C++
- standard
- </para>
- </listitem>
- <listitem>
- <para>
- <option>-std=c++03</option> for the 1998 standard with the
- changes from the TR1 technical report
- </para>
- </listitem>
- <listitem>
- <para>
- <option>-std=c++11</option> for the 2011 C++ standard. This
- option should not be used.
- </para>
- </listitem>
- <listitem>
- <para>
- <option>-std=c++0x</option> for several different versions
- of C++11 support in development, depending on the GCC
- version. This option should not be used.
- <!-- There were two incompatibilies before GCC 4.7.2
- (std::list and std::pair), but link C++98 and C++11
- code is still unsupported, although it currently has
- some chance of working by accident. -->
- </para>
- </listitem>
- </itemizedlist>
- <para>
- For each of these flags, there are variants which also enable
- GNU extensions (mostly language features also found in C99 or
- C11): <option>-std=gnu++98</option>,
- <option>-std=gnu++03</option>,
<option>-std=gnu++11</option>.
- Again, <option>-std=gnu++11</option> should not be used.
- </para>
- <para>
- If you enable C++11 support, the ABI of the standard C++ library
- <literal>libstdc++</literal> will change in subtle ways.
- Currently, no C++ libraries are compiled in C++11 mode, so if
- you compile your code in C++11 mode, it will be incompatible
- with the rest of the system. Unfortunately, this is also the
- case if you do not use any C++11 features. Currently, there is
- no safe way to enable C++11 mode (except for freestanding
- applications).
- </para>
- <para>
- The meaning of C++0X mode changed from GCC release to GCC
- release. Earlier versions were still ABI-compatible with C++98
- mode, but in the most recent versions, switching to C++0X mode
- activates C++11 support, with its compatibility problems.
- </para>
- <para>
- Some C++11 features (or approximations thereof) are available
- with TR1 support, that is, with <option>-std=c++03</option> or
- <option>-std=gnu++03</option> and in the
- <literal><tr1/*></literal> header files. This includes
- <literal>std::tr1::shared_ptr</literal> (from
- <literal><tr1/memory></literal>) and
- <literal>std::tr1::function</literal> (from
- <literal><tr1/functional></literal>). For other C++11
- features, the Boost C++ library contains replacements.
- </para>
- </section>
-</section>
-
diff --git a/defensive-coding/en-US/CXX/.svn/text-base/Std.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/text-base/Std.xml.svn-base
deleted file mode 100644
index 5ed53a4..0000000
--- a/defensive-coding/en-US/CXX/.svn/text-base/Std.xml.svn-base
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<section id="sect-Defensive_Coding-CXX-Std">
- <title>The C++ standard library</title>
- <para>
- The C++ standard library includes most of its C counterpart
- by reference, see <xref linkend="sect-Defensive_Coding-C-Libc"/>.
- </para>
- <section>
- <title>Containers and <literal>operator[]</literal></title>
- <para>
- Many containers similar to <literal>std::vector</literal>
- provide both <literal>operator[](size_type)</literal> and a
- member function <literal>at(size_type)</literal>. This applies
- to <literal>std::vector</literal> itself,
- <literal>std::array</literal>,
<literal>std::string</literal>
- and other instances of <literal>std::basic_string</literal>.
- </para>
- <para>
- <literal>operator[](size_type)</literal> is not required by the
- standard to perform bounds checking (and the implementation in
- GCC does not). In contrast, <literal>at(size_type)</literal>
- must perform such a check. Therefore, in code which is not
- performance-critical, you should prefer
- <literal>at(size_type)</literal> over
- <literal>operator[](size_type)</literal>, even though it is
- slightly more verbose.
- </para>
- </section>
-</section>
-
diff --git a/defensive-coding/en-US/CXX/.svn/text-base/schemas.xml.svn-base
b/defensive-coding/en-US/CXX/.svn/text-base/schemas.xml.svn-base
deleted file mode 100644
index 8e84245..0000000
--- a/defensive-coding/en-US/CXX/.svn/text-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<locatingRules
xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
- <include rules="../../schemas.xml"/>
-</locatingRules>
diff --git a/defensive-coding/en-US/Features/.svn/all-wcprops
b/defensive-coding/en-US/Features/.svn/all-wcprops
deleted file mode 100644
index 9c19089..0000000
--- a/defensive-coding/en-US/Features/.svn/all-wcprops
+++ /dev/null
@@ -1,23 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 74
-/repos/product-security/!svn/ver/302/defensive-coding/trunk/en-US/Features
-END
-TLS.xml
-K 25
-svn:wc:ra_dav:version-url
-V 82
-/repos/product-security/!svn/ver/302/defensive-coding/trunk/en-US/Features/TLS.xml
-END
-schemas.xml
-K 25
-svn:wc:ra_dav:version-url
-V 86
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/Features/schemas.xml
-END
-Authentication.xml
-K 25
-svn:wc:ra_dav:version-url
-V 93
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Features/Authentication.xml
-END
diff --git a/defensive-coding/en-US/Features/.svn/dir-prop-base
b/defensive-coding/en-US/Features/.svn/dir-prop-base
deleted file mode 100644
index b0e5252..0000000
--- a/defensive-coding/en-US/Features/.svn/dir-prop-base
+++ /dev/null
@@ -1,6 +0,0 @@
-K 10
-svn:ignore
-V 9
-snippets
-
-END
diff --git a/defensive-coding/en-US/Features/.svn/entries
b/defensive-coding/en-US/Features/.svn/entries
deleted file mode 100644
index f4cc53b..0000000
--- a/defensive-coding/en-US/Features/.svn/entries
+++ /dev/null
@@ -1,130 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/en-US/Features
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2013-01-16T14:32:22.318444Z
-302
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-TLS.xml
-file
-
-
-
-
-2013-01-16T22:05:55.369436Z
-d466f82b291f65cf802244af678d52dd
-2013-01-16T14:32:22.318444Z
-302
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-41635
-
-schemas.xml
-file
-
-
-
-
-2013-01-10T17:17:49.036814Z
-769bc2635d36b318161574a1adf2f6e7
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-150
-
-Authentication.xml
-file
-
-
-
-
-2013-01-10T17:17:49.036814Z
-6430a1389eb187d0fbcc79bea6c1a21e
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-8257
-
diff --git a/defensive-coding/en-US/Features/.svn/prop-base/Authentication.xml.svn-base
b/defensive-coding/en-US/Features/.svn/prop-base/Authentication.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Features/.svn/prop-base/Authentication.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Features/.svn/prop-base/TLS.xml.svn-base
b/defensive-coding/en-US/Features/.svn/prop-base/TLS.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Features/.svn/prop-base/TLS.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Features/.svn/prop-base/schemas.xml.svn-base
b/defensive-coding/en-US/Features/.svn/prop-base/schemas.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Features/.svn/prop-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Features/.svn/text-base/Authentication.xml.svn-base
b/defensive-coding/en-US/Features/.svn/text-base/Authentication.xml.svn-base
deleted file mode 100644
index c32792a..0000000
--- a/defensive-coding/en-US/Features/.svn/text-base/Authentication.xml.svn-base
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-Authentication">
- <title>Authentication and Authorization</title>
-
- <section id="sect-Defensive_Coding-Authentication-Server">
- <title>Authenticating servers</title>
- <para>
- When connecting to a server, a client has to make sure that it
- is actually talking to the server it expects. There are two
- different aspects, securing the network path, and making sure
- that the expected user runs the process on the target host.
- There are several ways to ensure that:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The server uses a TLS certificate which is valid according
- to the web browser public key infrastructure, and the client
- verifies the certificate and the host name.
- </para>
- </listitem>
- <listitem>
- <para>
- The server uses a TLS certificate which is expectedby the
- client (perhaps it is stored in a configuration file read by
- the client). In this case, no host name checking is
- required.
- </para>
- </listitem>
- <listitem>
- <para>
- On Linux, UNIX domain sockets (of the
- <literal>PF_UNIX</literal> protocol family, sometimes called
- <literal>PF_LOCAL</literal>) are restricted by file system
- permissions. If the server socket path is not
- world-writable, the server identity cannot be spoofed by
- local users.
- </para>
- </listitem>
- <listitem>
- <para>
- Port numbers less than 1024 (<emphasis>trusted
- ports</emphasis>) can only be used by
- <literal>root</literal>, so if a UDP or TCP server is
- running on the local host and it uses a trusted port, its
- identity is assured. (Not all operating systems enforce the
- trusted ports concept, and the network might not be trusted,
- so it is only useful on the local system.)
- </para>
- </listitem>
- </itemizedlist>
- <para>
- TLS (<xref linkend="chap-Defensive_Coding-TLS"/>) is the
- recommended way for securing connections over untrusted
- networks.
- </para>
- <para>
- If the server port number is 1024 is higher, a local user can
- impersonate the process by binding to this socket, perhaps after
- crashing the real server by exploiting a denial-of-service
- vulnerability.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Authentication-Host_based">
- <title>Host-based authentication</title>
- <para>
- Host-based authentication uses access control lists (ACLs) to
- accept or deny requests from clients. Thsis authentication
- method comes in two flavors: IP-based (or, more generally,
- address-based) and name-based (with the name coming from DNS or
- <filename>/etc/hosts</filename>). IP-based ACLs often use
- prefix notation to extend access to entire subnets. Name-based
- ACLs sometimes use wildcards for adding groups of hosts (from
- entire DNS subtrees). (In the SSH context, host-based
- authentication means something completely different and is not
- covered in this section.)
- </para>
- <para>
- Host-based authentication trust the network and may not offer
- sufficient granularity, so it has to be considered a weak form
- of authentication. On the other hand, IP-based authentication
- can be made extremely robust and can be applied very early in
- input processing, so it offers an opportunity for significantly
- reducing the number of potential attackers for many services.
- </para>
- <para>
- The names returned by <function>gethostbyaddr</function> and
- <function>getnameinfo</function> functions cannot be trusted.
- (DNS PTR records can be set to arbitrary values, not just names
- belong to the address owner.) If these names are used for ACL
- matching, a forward lookup using
- <function>gethostbyaddr</function> or
- <function>getaddrinfo</function> has to be performed. The name
- is only valid if the original address is found among the results
- of the forward lookup (<emphasis>double-reverse
- lookup</emphasis>).
- </para>
- <para>
- An empty ACL should deny all access (deny-by-default). If empty
- ACLs permits all access, configuring any access list must switch
- to deny-by-default for all unconfigured protocols, in both
- name-based and address-based variants.
- </para>
- <para>
- Similarly, if an address or name is not matched by the list, it
- should be denied. However, many implementations behave
- differently, so the actual behavior must be documented properly.
- </para>
- <para>
- IPv6 addresses can embed IPv4 addresses. There is no
- universally correct way to deal with this ambiguity. The
- behavior of the ACL implementation should be documented.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Authentication-UNIX_Domain">
- <title>UNIX domain socket authentication</title>
- <para>
- UNIX domain sockets (with address family
- <literal>AF_UNIX</literal> or <literal>AF_LOCAL</literal>)
are
- restricted to the local host and offer a special authentication
- mechanism: credentials passing.
- </para>
- <para>
- Nowadays, most systems support the
- <literal>SO_PEERCRED</literal> (Linux) or
- <literal>LOCAL_PEERCRED</literal> (FreeBSD) socket options, or
- the <function>getpeereid</function> (other BSDs, MacOS X).
- These interfaces provide direct access to the (effective) user
- ID on the other end of a domain socket connect, without
- cooperation from the other end.
- </para>
- <para>
- Historically, credentials passing was implemented using
- ancillary data in the <function>sendmsg</function> and
- <function>recvmsg</function> functions. On some systems, only
- credentials data that the peer has explicitly sent can be
- received, and the kernel checks the data for correctness on the
- sending side. This means that both peers need to deal with
- ancillary data. Compared to that, the modern interfaces are
- easier to use. Both sets of interfaces vary considerably among
- UNIX-like systems, unfortunately.
- </para>
- <para>
- If you want to authenticate based on supplementary groups, you
- should obtain the user ID using one of these methods, and look
- up the list of supplementary groups using
- <function>getpwuid</function> (or
- <function>getpwuid_r</function>) and
- <function>getgrouplist</function>. Using the PID and
- information from <filename>/proc/PID/status</filename> is prone
- to race conditions and insecure.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Authentication-Netlink">
- <title><literal>AF_NETLINK</literal> authentication of
origin</title>
- <!-- ??? kernel change may make this obsolete:
-
https://bugzilla.redhat.com/show_bug.cgi?id=851968 -->
- <para>
- Netlink messages are used as a high-performance data transfer
- mechanism between the kernel and the userspace. Traditionally,
- they are used to exchange information related to the network
- statck, such as routing table entries.
- </para>
- <para>
- When processing Netlink messages from the kernel, it is
- important to check that these messages actually originate from
- the kernel, by checking that the port ID (or PID) field
- <literal>nl_pid</literal> in the
<literal>sockaddr_nl</literal>
- structure is <literal>0</literal>. (This structure can be
- obtained using <function>recvfrom</function> or
- <function>recvmsg</function>, it is different from the
- <literal>nlmsghdr</literal> structure.) The kernel does not
- prevent other processes from sending unicast Netlink messages,
- but the <literal>nl_pid</literal> field in the sender's socket
- address will be non-zero in such cases.
- </para>
- <para>
- Applications should not use <literal>AF_NETLINK</literal>
- sockets as an IPC mechanism among processes, but prefer UNIX
- domain sockets for this tasks.
- </para>
- </section>
-</chapter>
-
diff --git a/defensive-coding/en-US/Features/.svn/text-base/TLS.xml.svn-base
b/defensive-coding/en-US/Features/.svn/text-base/TLS.xml.svn-base
deleted file mode 100644
index a0432f5..0000000
--- a/defensive-coding/en-US/Features/.svn/text-base/TLS.xml.svn-base
+++ /dev/null
@@ -1,988 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-TLS">
- <title>Transport Layer Security</title>
- <para>
- Transport Layer Security (TLS, formerly Secure Sockets
- Layer/SSL) is the recommended way to to protect integrity and
- confidentiality while data is transferred over an untrusted
- network connection, and to identify the endpoint.
- </para>
- <section id="sect-Defensive_Coding-TLS-Pitfalls">
- <title>Common Pitfalls</title>
- <para>
- TLS implementations are difficult to use, and most of them lack
- a clean API design. The following sections contain
- implementation-specific advice, and some generic pitfalls are
- mentioned below.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Most TLS implementations have questionable default TLS
- cipher suites. Most of them enable anonymous Diffie-Hellman
- key exchange (but we generally want servers to authenticate
- themselves). Many do not disable ciphers which are subject
- to brute-force attacks because of restricted key lengths.
- Some even disable all variants of AES in the default
- configuration.
- </para>
- <para>
- When overriding the cipher suite defaults, it is recommended
- to disable all cipher suites which are not present on a
- whitelist, instead of simply enabling a list of cipher
- suites. This way, if an algorithm is disabled by default in
- the TLS implementation in a future security update, the
- application will not re-enable it.
- </para>
- </listitem>
- <listitem>
- <para>
- The name which is used in certificate validation must match
- the name provided by the user or configuration file. No host
- name canonicalization or IP address lookup must be performed.
- </para>
- </listitem>
- <listitem>
- <para>
- The TLS handshake has very poor performance if the TCP Nagle
- algorithm is active. You should switch on the
- <literal>TCP_NODELAY</literal> socket option (at least for the
- duration of the handshake), or use the Linux-specific
- <literal>TCP_CORK</literal> option.
- </para>
- <example id="ex-Defensive_Coding-TLS-Nagle">
- <title>Deactivating the TCP Nagle algorithm</title>
- <xi:include href="snippets/TLS-Nagle.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- </listitem>
- <listitem>
- <para>
- Implementing proper session resumption decreases handshake
- overhead considerably. This is important if the upper-layer
- protocol uses short-lived connections (like most application
- of HTTPS).
- </para>
- </listitem>
- <listitem>
- <para>
- Both client and server should work towards an orderly
- connection shutdown, that is send
- <literal>close_notify</literal> alerts and respond to them.
- This is especially important if the upper-layer protocol
- does not provide means to detect connection truncation (like
- some uses of HTTP).
- </para>
- </listitem>
- <listitem>
- <para>
- When implementing a server using event-driven programming,
- it is important to handle the TLS handshake properly because
- it includes multiple network round-trips which can block
- when an ordinary TCP <function>accept</function> would not.
- Otherwise, a client which fails to complete the TLS
- handshake for some reason will prevent the server from
- handling input from other clients.
- </para>
- </listitem>
- <listitem>
- <para>
- Unlike regular file descriptors, TLS connections cannot be
- passed between processes. Some TLS implementations add
- additional restrictions, and TLS connections generally
- cannot be used across <function>fork</function> function
- calls (see <xref
- linkend="sect-Defensive_Coding-Tasks-Processes-Fork-Parallel"/>).
- </para>
- </listitem>
- </itemizedlist>
- <section id="sect-Defensive_Coding-TLS-OpenSSL">
- <title>OpenSSL Pitfalls</title>
- <para>
- Some OpenSSL function use <emphasis>tri-state return
- values</emphasis>. Correct error checking is extremely
- important. Several functions return <literal>int</literal>
- values with the following meaning:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The value <literal>1</literal> indicates success (for
- example, a successful signature verification).
- </para>
- </listitem>
- <listitem>
- <para>
- The value <literal>0</literal> indicates semantic
- failure (for example, a signature verification which was
- unsuccessful because the signing certificate was
- self-signed).
- </para>
- </listitem>
- <listitem>
- <para>
- The value <literal>-1</literal> indicates a low-level
- error in the system, such as failure to allocate memory
- using <function>malloc</function>.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- Treating such tri-state return values as booleans can lead
- to security vulnerabilities. Note that some OpenSSL
- functions return boolean results or yet another set of
- status indicators. Each function needs to be checked
- individually.
- </para>
- <para>
- Recovering precise error information is difficult.
- <xref linkend="ex-Defensive_Coding-TLS-OpenSSL-Errors"/>
- shows how to obtain a more precise error code after a function
- call on an <literal>SSL</literal> object has failed. However,
- there are still cases where no detailed error information is
- available (e.g., if <function>SSL_shutdown</function> fails
- due to a connection teardown by the other end).
- </para>
- <example id="ex-Defensive_Coding-TLS-OpenSSL-Errors">
- <title>Obtaining OpenSSL error codes</title>
- <xi:include href="snippets/TLS-OpenSSL-Errors.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- The <function>OPENSSL_config</function> function is
- documented to never fail. In reality, it can terminate the
- entire process if there is a failure accessing the
- configuration file. An error message is written to standard
- error, but which might not be visible if the function is
- called from a daemon process.
- </para>
- <para>
- OpenSSL contains two separate ASN.1 DER decoders. One set
- of decoders operate on BIO handles (the input/output stream
- abstraction provided by OpenSSL); their decoder function
- names start with <literal>d2i_</literal> and end in
- <literal>_fp</literal> or <literal>_bio</literal> (e.g.,
- <function>d2i_X509_fp</function> or
- <function>d2i_X509_bio</function>). These decoders must not
- be used for parsing data from untrusted sources; instead,
- the variants without the <literal>_fp</literal> and
- <literal>_bio</literal> (e.g.,
- <function>d2i_X509</function>) shall be used. The BIO
- variants have received considerably less testing and are not
- very robust.
- </para>
- <para>
- For the same reason, the OpenSSL command line tools (such as
- <command>openssl x509</command>) are generally generally less
- robust than the actual library code. They use the BIO
- functions internally, and not the more robust variants.
- </para>
- <para>
- The command line tools do not always indicate failure in the
- exit status of the <application>openssl</application> process.
- For instance, a verification failure in <command>openssl
- verify</command> result in an exit status of zero.
- </para>
- <para>
- The OpenSSL server and client applications (<command>openssl
- s_client</command> and <command>openssl s_server</command>)
- are debugging tools and should <emphasis>never</emphasis> be
- used as generic clients. For instance, the
- <application>s_client</application> tool reacts in a
- surprisign way to lines starting with <literal>R</literal> and
- <literal>Q</literal>.
- </para>
- <para>
- OpenSSL allows application code to access private key
- material over documented interfaces. This can significantly
- increase the part of the code base which has to undergo
- security certification.
- </para>
- </section>
- <section id="sect-Defensive_Coding-TLS-Pitfalls-GNUTLS">
- <title>GNUTLS Pitfalls</title>
- <para>
- <filename>libgnutls.so.26</filename> links to
- <filename>libpthread.so.0</filename>. Loading the threading
- library too late causes problems, so the main program should
- be linked with <literal>-lpthread</literal> as well. As a
- result, it can be difficult to use GNUTLS in a plugin which is
- loaded with the <function>dlopen</function> function. Another
- side effect is that applications which merely link against
- GNUTLS (even without actually using it) may incur a
- substantial overhead because other libraries automatically
- switch to thread-safe algorithms.
- </para>
- <para>
- The <function>gnutls_global_init</function> function must be
- called before using any functionality provided by the library.
- This function is not thread-safe, so external locking is
- required, but it is not clear which lock should be used.
- Omitting the synchronization does not just lead to a memory
- leak, as it is suggested in the GNUTLS documentation, but to
- undefined behavior because there is no barrier that would
- enforce memory ordering.
- </para>
- <para>
- The <function>gnutls_global_deinit</function> function does
- not actually deallocate all resources allocated by
- <function>gnutls_global_init</function>. It is currently not
- thread-safe. Therefore, it is best to avoid calling it
- altogether.
- </para>
- <para>
- The X.509 implementation in GNUTLS is rather lenient. For
- example, it is possible to create and process X.509
- version 1 certificates which carry extensions. These
- certificates are (correctly) rejected by other
- implementations.
- </para>
- </section>
- <section id="sect-Defensive_Coding-TLS-Pitfalls-OpenJDK">
- <title>OpenJDK Pitfalls</title>
- <para>
- The Java cryptographic framework is highly modular. As a
- result, when you request an object implementing some
- cryptographic functionality, you cannot be completely sure
- that you end up with the well-tested, reviewed implementation
- in OpenJDK.
- </para>
- <para>
- OpenJDK (in the source code as published by Oracle) and other
- implementations of the Java platform require that the system
- administrator has installed so-called <emphasis>unlimited
- strength jurisdiction policy files</emphasis>. Without this
- step, it is not possible to use the secure algorithms which
- offer sufficient cryptographic strength. Most downstream
- redistributors of OpenJDK remove this requirement.
- </para>
- <para>
- Some versions of OpenJDK use <filename>/dev/random</filename>
- as the randomness source for nonces and other random data
- which is needed for TLS operation, but does not actually
- require physical randomness. As a result, TLS applications
- can block, waiting for more bits to become available in
- <filename>/dev/random</filename>.
- </para>
- </section>
- <section id="sect-Defensive_Coding-TLS-Pitfalls-NSS">
- <title>NSS Pitfalls</title>
- <para>
- NSS was not designed to be used by other libraries which can
- be linked into applications without modifying them. There is
- a lot of global state. There does not seem to be a way to
- perform required NSS initialization without race conditions.
- </para>
- <para>
- If the NSPR descriptor is in an unexpected state, the
- <function>SSL_ForceHandshake</function> function can succeed,
- but no TLS handshake takes place, the peer is not
- authenticated, and subsequent data is exchanged in the clear.
- </para>
- <para>
- NSS disables itself if it detects that the process underwent a
- <function>fork</function> after the library has been
- initialized. This behavior is required by the PKCS#11 API
- specification.
- </para>
- </section>
- </section>
- <section id="sect-Defensive_Coding-TLS-Client">
- <title>TLS Clients</title>
- <para>
- Secure use of TLS in a client generally involves all of the
- following steps. (Individual instructions for specific TLS
- implementations follow in the next sections.)
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The client must configure the TLS library to use a set of
- trusted root certificates. These certificates are provided
- by the system in <filename
- class="directory">/etc/ssl/certs</filename> or files derived
- from it.
- </para>
- </listitem>
- <listitem>
- <para>
- The client selects sufficiently strong cryptographic
- primitives and disables insecure ones (such as no-op
- encryption). Compression and SSL version 2 support must be
- disabled (including the SSLv2-compatible handshake).
- </para>
- </listitem>
- <listitem>
- <para>
- The client initiates the TLS connection. The Server Name
- Indication extension should be used if supported by the
- TLS implementation. Before switching to the encrypted
- connection state, the contents of all input and output
- buffers must be discarded.
- </para>
- </listitem>
- <listitem>
- <para>
- The client needs to validate the peer certificate provided
- by the server, that is, the client must check that there
- is a cryptographically protected chain from a trusted root
- certificate to the peer certificate. (Depending on the
- TLS implementation, a TLS handshake can succeed even if
- the certificate cannot be validated.)
- </para>
- </listitem>
- <listitem>
- <para>
- The client must check that the configured or user-provided
- server name matches the peer certificate provided by the
- server.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- It is safe to provide users detailed diagnostics on
- certificate validation failures. Other causes of handshake
- failures and, generally speaking, any details on other errors
- reported by the TLS implementation (particularly exception
- tracebacks), must not be divulged in ways that make them
- accessible to potential attackers. Otherwise, it is possible
- to create decryption oracles.
- </para>
- <important>
- <para>
- Depending on the application, revocation checking (against
- certificate revocations lists or via OCSP) and session
- resumption are important aspects of production-quality
- client. These aspects are not yet covered.
- </para>
- </important>
- <section>
- <title>Implementation TLS Clients With OpenSSL</title>
- <para>
- In the following code, the error handling is only exploratory.
- Proper error handling is required for production use,
- especially in libraries.
- <!-- FIXME: Cross-reference event-driven I/O section when it
- exists and mention that this is really quite complex to
- implement. -->
- </para>
- <para>
- The OpenSSL library needs explicit initialization (see <xref
- linkend="ex-Defensive_Coding-TLS-OpenSSL-Init"/>).
- </para>
- <example id="ex-Defensive_Coding-TLS-OpenSSL-Init">
- <title>OpenSSL library initialization</title>
- <xi:include href="snippets/TLS-Client-OpenSSL-Init.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- After that, a context object has to be created, which acts as
- a factory for connection objects (<xref
- linkend="ex-Defensive_Coding-TLS-Client-OpenSSL-CTX"/>). We
- use an explicit cipher list so that we do not pick up any
- strange ciphers when OpenSSL is upgraded. The actual version
- requested in the client hello depends on additional
- restrictions in the OpenSSL library. If possible, you should
- follow the example code and use the default list of trusted
- root certificate authorities provided by the system because
- you would have to maintain your own set otherwise, which can
- be cumbersome.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-OpenSSL-CTX">
- <title>OpenSSL client context creation</title>
- <xi:include href="snippets/TLS-Client-OpenSSL-CTX.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- A single context object can be used to create multiple
- connection objects. It is safe to use the same
- <literal>SSL_CTX</literal> object for creating connections
- concurrently from multiple threads, provided that the
- <literal>SSL_CTX</literal> object is not modified (e.g.,
- callbacks must not be changed).
- </para>
- <para>
- After creating the TCP socket and disabling the Nagle
- algorithm (per <xref
- linkend="ex-Defensive_Coding-TLS-Nagle"/>), the actual
- connection object needs to be created, as show in <xref
- linkend="ex-Defensive_Coding-TLS-Client-OpenSSL-CTX"/>. If
- the handshake started by <function>SSL_connect</function>
- fails, the <function>ssl_print_error_and_exit</function>
- function from <xref
- linkend="ex-Defensive_Coding-TLS-OpenSSL-Errors"/> is called.
- </para>
- <para>
- The <function>certificate_validity_override</function>
- function provides an opportunity to override the validity of
- the certificate in case the OpenSSL check fails. If such
- functionality is not required, the call can be removed,
- otherwise, the application developer has to implement it.
- </para>
- <para>
- The host name passed to the functions
- <function>SSL_set_tlsext_host_name</function> and
- <function>X509_check_host</function> must be the name that was
- passed to <function>getaddrinfo</function> or a similar name
- resolution function. No host name canonicalization must be
- performed. The <function>X509_check_host</function> function
- used in the final step for host name matching is currently
- only implemented in OpenSSL 1.1, which is not released yet.
- In case host name matching fails, the function
- <function>certificate_host_name_override</function> is called.
- This function should check user-specific certificate store, to
- allow a connection even if the host name does not match the
- certificate. This function has to be provided by the
- application developer. Note that the override must be keyed
- by both the certificate <emphasis>and</emphasis> the host
- name.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-OpenSSL-Connect">
- <title>Creating a client connection using OpenSSL</title>
- <xi:include href="snippets/TLS-Client-OpenSSL-Connect.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- The connection object can be used for sending and receiving
- data, as in <xref
- linkend="ex-Defensive_Coding-TLS-OpenSSL-Connection-Use"/>.
- It is also possible to create a <literal>BIO</literal> object
- and use the <literal>SSL</literal> object as the underlying
- transport, using <function>BIO_set_ssl</function>.
- </para>
- <example id="ex-Defensive_Coding-TLS-OpenSSL-Connection-Use">
- <title>Using an OpenSSL connection to send and receive data</title>
- <xi:include href="snippets/TLS-Client-OpenSSL-Connection-Use.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- When it is time to close the connection, the
- <function>SSL_shutdown</function> function needs to be called
- twice for an orderly, synchronous connection termination
- (<xref
- linkend="ex-Defensive_Coding-TLS-OpenSSL-Connection-Close"/>).
- This exchanges <literal>close_notify</literal> alerts with the
- server. The additional logic is required to deal with an
- unexpected <literal>close_notify</literal> from the server.
- Note that is necessary to explicitly close the underlying
- socket after the connection object has been freed.
- </para>
- <example id="ex-Defensive_Coding-TLS-OpenSSL-Connection-Close">
- <title>Closing an OpenSSL connection in an orderly fashion</title>
- <xi:include href="snippets/TLS-OpenSSL-Connection-Close.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- <xref linkend="ex-Defensive_Coding-TLS-OpenSSL-Context-Close"/> shows
how
- to deallocate the context object when it is no longer needed
- because no further TLS connections will be established.
- </para>
- <example id="ex-Defensive_Coding-TLS-OpenSSL-Context-Close">
- <title>Closing an OpenSSL connection in an orderly fashion</title>
- <xi:include href="snippets/TLS-OpenSSL-Context-Close.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- </section>
- <section id="sect-Defensive_Coding-TLS-Client-GNUTLS">
- <title>Implementation TLS Clients With GNUTLS</title>
- <para>
- This section describes how to implement a TLS client with full
- certificate validation (but without certificate revocation
- checking). Note that the error handling in is only
- exploratory and needs to be replaced before production use.
- </para>
- <para>
- The GNUTLS library needs explicit initialization:
- </para>
- <informalexample id="ex-Defensive_Coding-TLS-GNUTLS-Init">
- <xi:include href="snippets/TLS-GNUTLS-Init.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- Failing to do so can result in obscure failures in Base64
- decoding. See <xref
- linkend="sect-Defensive_Coding-TLS-Pitfalls-GNUTLS"/> for
- additional aspects of initialization.
- </para>
- <para>
- Before setting up TLS connections, a credentials objects has
- to be allocated and initialized with the set of trusted root
- CAs (<xref
- linkend="ex-Defensive_Coding-TLS-Client-GNUTLS-Credentials"/>).
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-GNUTLS-Credentials">
- <title>Initializing a GNUTLS credentials structure</title>
- <xi:include href="snippets/TLS-Client-GNUTLS-Credentials.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- After the last TLS connection has been closed, this credentials
- object should be freed:
- </para>
- <informalexample>
- <xi:include href="snippets/TLS-GNUTLS-Credentials-Close.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- During its lifetime, the credentials object can be used to
- initialize TLS session objects from multiple threads, provided
- that it is not changed.
- </para>
- <para>
- Once the TCP connection has been established, the Nagle
- algorithm should be disabled (see <xref
- linkend="ex-Defensive_Coding-TLS-Nagle"/>). After that, the
- socket can be associated with a new GNUTLS session object.
- The previously allocated credentials object provides the set
- of root CAs. The <literal>NORMAL</literal> set of cipher
- suites and protocols provides a reasonable default. Then the
- TLS handshake must be initiated. This is shown in <xref
- linkend="ex-Defensive_Coding-TLS-Client-GNUTLS-Connect"/>.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-GNUTLS-Connect">
- <title>Establishing a TLS client connection using GNUTLS</title>
- <xi:include href="snippets/TLS-Client-GNUTLS-Connect.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- After the handshake has been completed, the server certificate
- needs to be verified (<xref
- linkend="ex-Defensive_Coding-TLS-Client-GNUTLS-Verify"/>). In
- the example, the user-defined
- <function>certificate_validity_override</function> function is
- called if the verification fails, so that a separate,
- user-specific trust store can be checked. This function call
- can be omitted if the functionality is not needed.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-GNUTLS-Verify">
- <title>Verifying a server certificate using GNUTLS</title>
- <xi:include href="snippets/TLS-Client-GNUTLS-Verify.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- In the next step (<xref
- linkend="ex-Defensive_Coding-TLS-Client-GNUTLS-Match"/>, the
- certificate must be matched against the host name (note the
- unusual return value from
- <function>gnutls_x509_crt_check_hostname</function>). Again,
- an override function
- <function>certificate_host_name_override</function> is called.
- Note that the override must be keyed to the certificate
- <emphasis>and</emphasis> the host name. The function call can
- be omitted if the override is not needed.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-GNUTLS-Match">
- <title>Matching the server host name and certificate in a
- GNUTLS client</title>
- <xi:include href="snippets/TLS-Client-GNUTLS-Match.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- In newer GNUTLS versions, certificate checking and host name
- validation can be combined using the
- <function>gnutls_certificate_verify_peers3</function> function.
- </para>
- <para>
- An established TLS session can be used for sending and
- receiving data, as in <xref
- linkend="ex-Defensive_Coding-TLS-GNUTLS-Use"/>.
- </para>
- <example id="ex-Defensive_Coding-TLS-GNUTLS-Use">
- <title>Using a GNUTLS session</title>
- <xi:include href="snippets/TLS-GNUTLS-Use.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- In order to shut down a connection in an orderly manner, you
- should call the <function>gnutls_bye</function> function.
- Finally, the session object can be deallocated using
- <function>gnutls_deinit</function> (see <xref
- linkend="ex-Defensive_Coding-TLS-GNUTLS-Disconnect"/>).
- </para>
- <example id="ex-Defensive_Coding-TLS-GNUTLS-Disconnect">
- <title>Using a GNUTLS session</title>
- <xi:include href="snippets/TLS-GNUTLS-Disconnect.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- </section>
- <section id="sect-Defensive_Coding-TLS-Client-OpenJDK">
- <title>Implementing TLS Clients With OpenJDK</title>
- <para>
- The examples below use the following cryptographic-related
- classes:
- </para>
- <informalexample>
- <xi:include href="snippets/TLS-Client-OpenJDK-Import.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- If compatibility with OpenJDK 6 is required, it is necessary
- to use the internal class
- <literal>sun.security.util.HostnameChecker</literal>. (The
- public OpenJDK API does not provide any support for dissecting
- the subject distinguished name of an X.509 certificate, so a
- custom-written DER parser is needed—or we have to use an
- internal class, which we do below.) In OpenJDK 7, the
- <function>setEndpointIdentificationAlgorithm</function> method
- was added to the
- <literal>javax.net.ssl.SSLParameters</literal> class,
- providing an official way to implement host name checking.
- </para>
- <para>
- TLS connections are established using an
- <literal>SSLContext</literal> instance. With a properly
- configured OpenJDK installation, the
- <literal>SunJSSE</literal> provider uses the system-wide set
- of trusted root certificate authorities, so no further
- configuration is necessary. For backwards compatibility with
- OpenJDK 6, the <literal>TLSv1</literal> provider has to
- be supported as a fall-back option. This is shown in <xref
- linkend="ex-Defensive_Coding-TLS-Client-OpenJDK-Context"/>.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-OpenJDK-Context">
- <title>Setting up an <literal>SSLContext</literal> for OpenJDK TLS
- clients</title>
- <xi:include href="snippets/TLS-Client-OpenJDK-Context.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- In addition to the context, a TLS parameter object will be
- needed which adjusts the cipher suites and protocols (<xref
- linkend="ex-Defensive_Coding-TLS-OpenJDK-Parameters"/>). Like
- the context, these parameters can be reused for multiple TLS
- connections.
- </para>
- <example id="ex-Defensive_Coding-TLS-OpenJDK-Parameters">
- <title>Setting up <literal>SSLParameters</literal> for TLS use
- with OpenJDK</title>
- <xi:include href="snippets/TLS-OpenJDK-Parameters.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- As initialized above, the parameter object does not yet
- require host name checking. This has to be enabled
- separately, and this is only supported by OpenJDK 7 and later:
- </para>
- <informalexample>
- <xi:include href="snippets/TLS-Client-OpenJDK-Hostname.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- All application protocols can use the
- <literal>"HTTPS"</literal> algorithm. (The algorithms have
- minor differences with regard to wildcard handling, which
- should not matter in practice.)
- </para>
- <para>
- <xref linkend="ex-Defensive_Coding-TLS-Client-OpenJDK-Connect"/>
- shows how to establish the connection. Before the handshake
- is initialized, the protocol and cipher configuration has to
- be performed, by applying the parameter object
- <literal>params</literal>. (After this point, changes to
- <literal>params</literal> will not affect this TLS socket.)
- As mentioned initially, host name checking requires using an
- internal API on OpenJDK 6.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-OpenJDK-Connect">
- <title>Establishing a TLS connection with OpenJDK</title>
- <xi:include href="snippets/TLS-Client-OpenJDK-Connect.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- Starting with OpenJDK 7, the last lines can be omitted,
- provided that host name verification has been enabled by
- calling the
- <function>setEndpointIdentificationAlgorithm</function> method
- on the <literal>params</literal> object (before it was applied
- to the socket).
- </para>
- <para>
- The TLS socket can be used as a regular socket, as shown in
- <xref linkend="ex-Defensive_Coding-TLS-Client-OpenJDK-Use"/>.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-OpenJDK-Use">
- <title>Using a TLS client socket in OpenJDK</title>
- <xi:include href="snippets/TLS-Client-OpenJDK-Use.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <section>
- <title>Overriding server certificate validation with OpenJDK 6</title>
- <para>
- Overriding certificate validation requires a custom trust
- manager. With OpenJDK 6, the trust manager lacks
- information about the TLS session, and to which server the
- connection is made. Certificate overrides have to be tied
- to specific servers (host names). Consequently, different
- <literal>TrustManager</literal> and
- <literal>SSLContext</literal> objects have to be used for
- different servers.
- </para>
- <para>
- In the trust manager shown in <xref
- linkend="ex-Defensive_Coding-TLS-Client-MyTrustManager"/>,
- the server certificate is identified by its SHA-256 hash.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-MyTrustManager">
- <title>A customer trust manager for OpenJDK TLS clients</title>
- <xi:include href="snippets/TLS-Client-OpenJDK-MyTrustManager.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- This trust manager has to be passed to the
- <literal>init</literal> method of the
- <literal>SSLContext</literal> object, as show in <xref
- linkend="ex-Defensive_Coding-TLS-Client-Context_For_Cert"/>.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-Context_For_Cert">
- <title>Using a custom TLS trust manager with OpenJDK</title>
- <xi:include href="snippets/TLS-Client-OpenJDK-Context_For_Cert.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- When certificate overrides are in place, host name
- verification should not be performed because there is no
- security requirement that the host name in the certificate
- matches the host name used to establish the connection (and
- it often will not). However, without host name
- verification, it is not possible to perform transparent
- fallback to certification validation using the system
- certificate store.
- </para>
- <para>
- The approach described above works with OpenJDK 6 and later
- versions. Starting with OpenJDK 7, it is possible to use a
- custom subclass of the
- <literal>javax.net.ssl.X509ExtendedTrustManager</literal>
- class. The OpenJDK TLS implementation will call the new
- methods, passing along TLS session information. This can be
- used to implement certificate overrides as a fallback (if
- certificate or host name verification fails), and a trust
- manager object can be used for multiple servers because the
- server address is available to the trust manager.
- </para>
- </section>
- </section>
- <section id="sect-Defensive_Coding-TLS-Client-NSS">
- <title>Implementing TLS Clients With NSS</title>
- <para>
- The following code shows how to implement a simple TLS client
- using NSS. Note that the error handling needs replacing
- before production use.
- </para>
- <para>
- Using NSS needs several header files, as shown in
- <xref linkend="ex-Defensive_Coding-TLS-NSS-Includes"/>.
- </para>
- <example id="ex-Defensive_Coding-TLS-NSS-Includes">
- <title>Include files for NSS</title>
- <xi:include href="snippets/TLS-NSS-Includes.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- Initializing the NSS library is a complex task (<xref
- linkend="ex-Defensive_Coding-TLS-NSS-Init"/>). It is not
- thread-safe. By default, the library is in export mode, and
- all strong ciphers are disabled. Therefore, after creating
- the <literal>NSSInitCContext</literal> object, we probe all
- the strong ciphers we want to use, and check if at least one
- of them is available. If not, we call
- <function>NSS_SetDomesticPolicy</function> to switch to
- unrestricted policy mode. This function replaces the existing
- global cipher suite policy, that is why we avoid calling it
- unless absolutely necessary.
- </para>
- <para>
- The simplest way to configured the trusted root certificates
- involves loading the <filename>libnssckbi.so</filename> NSS
- module with a call to the
- <function>SECMOD_LoadUserModule</function> function. The root
- certificates are compiled into this module. (The PEM module
- for NSS, <filename>libnsspem.so</filename>, offers a way to
- load trusted CA certificates from a file.)
- </para>
- <example id="ex-Defensive_Coding-TLS-NSS-Init">
- <title>Initializing the NSS library</title>
- <xi:include href="snippets/TLS-NSS-Init.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- Some of the effects of the initialization can be reverted with
- the following function calls:
- </para>
- <informalexample id="ex-Defensive_Coding-TLS-NSS-Close">
- <xi:include href="snippets/TLS-NSS-Close.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- After NSS has been initialized, the TLS connection can be
- created (<xref
- linkend="ex-Defensive_Coding-TLS-Client-NSS-Connect"/>). The
- internal <function>PR_ImportTCPSocket</function> function is
- used to turn the POSIX file descriptor
- <literal>sockfd</literal> into an NSPR file descriptor. (This
- function is de-facto part of the NSS public ABI, so it will
- not go away.) Creating the TLS-capable file descriptor
- requires a <emphasis>model</emphasis> descriptor, which is
- configured with the desired set of protocols and ciphers.
- (The <literal>good_ciphers</literal> variable is part of <xref
- linkend="ex-Defensive_Coding-TLS-NSS-Init"/>.) We cannot
- resort to disabling ciphers not on a whitelist because by
- default, the AES cipher suites are disabled. The model
- descriptor is not needed anymore after TLS support has been
- activated for the existing connection descriptor.
- </para>
- <para>
- The call to <function>SSL_BadCertHook</function> can be
- omitted if no mechanism to override certificate verification
- is needed. The <literal>bad_certificate</literal> function
- must check both the host name specified for the connection and
- the certificate before granting the override.
- </para>
- <para>
- Triggering the actual handshake requires three function calls,
- <function>SSL_ResetHandshake</function>,
- <function>SSL_SetURL</function>, and
- <function>SSL_ForceHandshake</function>. (If
- <function>SSL_ResetHandshake</function> is omitted,
- <function>SSL_ForceHandshake</function> will succeed, but the
- data will not be encrypted.) During the handshake, the
- certificate is verified and matched against the host name.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-NSS-Connect">
- <title>Creating a TLS connection with NSS</title>
- <xi:include href="snippets/TLS-Client-NSS-Connect.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- After the connection has been established, <xref
- linkend="ex-Defensive_Coding-TLS-NSS-Use"/> shows how to use
- the NSPR descriptor to communicate with the server.
- </para>
- <example id="ex-Defensive_Coding-TLS-NSS-Use">
- <title>Using NSS for sending and receiving data</title>
- <xi:include href="snippets/TLS-NSS-Use.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- <xref linkend="ex-Defensive_Coding-TLS-Client-NSS-Close"/>
- shows how to close the connection.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-NSS-Close">
- <title>Closing NSS client connections</title>
- <xi:include href="snippets/TLS-Client-NSS-Close.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- </section>
- <section id="sect-Defensive_Coding-TLS-Client-Python">
- <title>Implementing TLS Clients With Python</title>
- <para>
- The Python distribution provides a TLS implementation in the
- <literal>ssl</literal> module (actually a wrapper around
- OpenSSL). The exported interface is somewhat restricted, so
- that the client code shown below does not fully implement the
- recommendations in <xref
- linkend="sect-Defensive_Coding-TLS-OpenSSL"/>.
- </para>
- <important>
- <para>
- Currently, most Python function which accept
- <literal>https://</literal> URLs or otherwise implement
- HTTPS support do not perform certificate validation at all.
- (For example, this is true for the <literal>httplib</literal>
- and <literal>xmlrpclib</literal> modules.) If you use
- HTTPS, you should not use the built-in HTTP clients. The
- <literal>Curl</literal> class in the <literal>curl</literal>
- module, as provided by the <literal>python-pycurl</literal>
- package implements proper certificate validation.
- </para>
- </important>
- <para>
- The <literal>ssl</literal> module currently does not perform
- host name checking on the server certificate. <xref
- linkend="ex-Defensive_Coding-TLS-Client-Python-check_host_name"/>
- shows how to implement certificate matching, using the parsed
- certificate returned by <function>getpeercert</function>.
- </para>
- <example
id="ex-Defensive_Coding-TLS-Client-Python-check_host_name">
- <title>Implementing TLS host name checking Python (without
- wildcard support)</title>
- <xi:include href="snippets/TLS-Client-Python-check_host_name.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- To turn a regular, connected TCP socket into a TLS-enabled
- socket, use the <function>ssl.wrap_socket</function> function.
- The function call in <xref
- linkend="ex-Defensive_Coding-TLS-Client-Python-Connect"/>
- provides additional arguments to override questionable
- defaults in OpenSSL and in the Python module.
- </para>
- <itemizedlist>
- <listitem>
- <para>
-
<literal>ciphers="HIGH:-aNULL:-eNULL:-PSK:RC4-SHA:RC4-MD5"</literal>
- selects relatively strong cipher suites with
- certificate-based authentication. (The call to
- <function>check_host_name</function> function provides
- additional protection against anonymous cipher suites.)
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ssl_version=ssl.PROTOCOL_TLSv1</literal> disables
- SSL 2.0 support. By default, the <literal>ssl</literal>
- module sends an SSL 2.0 client hello, which is rejected by
- some servers. Ideally, we would request OpenSSL to
- negotiated the most recent TLS version supported by the
- server and the client, but the Python module does not
- allow this.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>cert_reqs=ssl.CERT_REQUIRED</literal> turns on
- certificate validation.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>ca_certs='/etc/ssl/certs/ca-bundle.crt'</literal>
- initializes the certificate store with a set of trusted
- root CAs. Unfortunately, it is necessary to hard-code
- this path into applications because the default path in
- OpenSSL is not available through the Python
- <literal>ssl</literal> module.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The <literal>ssl</literal> module (and OpenSSL) perform
- certificate validation, but the certificate must be compared
- manually against the host name, by calling the
- <function>check_host_name</function> defined above.
- </para>
- <example id="ex-Defensive_Coding-TLS-Client-Python-Connect">
- <title>Establishing a TLS client connection with Python</title>
- <xi:include href="snippets/TLS-Client-Python-Connect.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- After the connection has been established, the TLS socket can
- be used like a regular socket:
- </para>
- <informalexample>
- <xi:include href="snippets/TLS-Python-Use.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- <para>
- Closing the TLS socket is straightforward as well:
- </para>
- <informalexample>
- <xi:include href="snippets/TLS-Python-Close.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </informalexample>
- </section>
- </section>
-</chapter>
diff --git a/defensive-coding/en-US/Features/.svn/text-base/schemas.xml.svn-base
b/defensive-coding/en-US/Features/.svn/text-base/schemas.xml.svn-base
deleted file mode 100644
index 8e84245..0000000
--- a/defensive-coding/en-US/Features/.svn/text-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<locatingRules
xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
- <include rules="../../schemas.xml"/>
-</locatingRules>
diff --git a/defensive-coding/en-US/Python/.svn/all-wcprops
b/defensive-coding/en-US/Python/.svn/all-wcprops
deleted file mode 100644
index 33d4e7b..0000000
--- a/defensive-coding/en-US/Python/.svn/all-wcprops
+++ /dev/null
@@ -1,17 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 72
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/Python
-END
-Language.xml
-K 25
-svn:wc:ra_dav:version-url
-V 85
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Python/Language.xml
-END
-schemas.xml
-K 25
-svn:wc:ra_dav:version-url
-V 84
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/Python/schemas.xml
-END
diff --git a/defensive-coding/en-US/Python/.svn/dir-prop-base
b/defensive-coding/en-US/Python/.svn/dir-prop-base
deleted file mode 100644
index b0e5252..0000000
--- a/defensive-coding/en-US/Python/.svn/dir-prop-base
+++ /dev/null
@@ -1,6 +0,0 @@
-K 10
-svn:ignore
-V 9
-snippets
-
-END
diff --git a/defensive-coding/en-US/Python/.svn/entries
b/defensive-coding/en-US/Python/.svn/entries
deleted file mode 100644
index 2f278e2..0000000
--- a/defensive-coding/en-US/Python/.svn/entries
+++ /dev/null
@@ -1,96 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/en-US/Python
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-Language.xml
-file
-
-
-
-
-2013-01-10T17:17:40.317763Z
-00327c6f05b6d4d52a043fe8caff08b9
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-2620
-
-schemas.xml
-file
-
-
-
-
-2013-01-10T17:17:40.317763Z
-769bc2635d36b318161574a1adf2f6e7
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-150
-
diff --git a/defensive-coding/en-US/Python/.svn/prop-base/Language.xml.svn-base
b/defensive-coding/en-US/Python/.svn/prop-base/Language.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Python/.svn/prop-base/Language.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Python/.svn/prop-base/schemas.xml.svn-base
b/defensive-coding/en-US/Python/.svn/prop-base/schemas.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Python/.svn/prop-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Python/.svn/text-base/Language.xml.svn-base
b/defensive-coding/en-US/Python/.svn/text-base/Language.xml.svn-base
deleted file mode 100644
index 5cfec8f..0000000
--- a/defensive-coding/en-US/Python/.svn/text-base/Language.xml.svn-base
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-Python">
- <title>The Python Programming Language</title>
- <para>
- Python provides memory safety by default, so low-level security
- vulnerabilities are rare and typically needs fixing the Python
- interpreter or standard library itself.
- </para>
- <para>
- Other sections with Python-specific advice include:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="chap-Defensive_Coding-Tasks-Temporary_Files"/>
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Defensive_Coding-Tasks-Processes-Creation"/>
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="chap-Defensive_Coding-Tasks-Serialization"/>, in
- particular <xref
linkend="sect-Defensive_Coding-Tasks-Serialization-Library"/>
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Defensive_Coding-Tasks-Cryptography-Randomness"/>
- </para>
- </listitem>
- </itemizedlist>
- <section>
- <title>Dangerous standard library features</title>
- <para>
- Some areas of the standard library, notably the
- <literal>ctypes</literal> module, do not provide memory safety
- guarantees comparable to the rest of Python. If such
- functionality is used, the advice in <xref
- linkend="sect-Defensive_Coding-C-Language"/> should be followed.
- </para>
- </section>
- <section>
- <title>Run-time compilation and code generation</title>
- <para>
- The following Python functions and statements related to code
- execution should be avoided:
- </para>
- <itemizedlist>
-
<listitem><para><function>compile</function></para></listitem>
-
<listitem><para><function>eval</function></para></listitem>
-
<listitem><para><literal>exec</literal></para></listitem>
-
<listitem><para><function>execfile</function></para></listitem>
- </itemizedlist>
- <para>
- If you need to parse integers or floating point values, use the
- <function>int</function> and <function>float</function>
- functions instead of <function>eval</function>. Sandboxing
- untrusted Python code does not work reliably.
- </para>
- </section>
- <section>
- <title>Sandboxing</title>
- <para>
- The <literal>rexec</literal> Python module cannot safely sandbox
- untrusted code and should not be used. The standard CPython
- implementation is not suitable for sandboxing.
- </para>
- </section>
-</chapter>
diff --git a/defensive-coding/en-US/Python/.svn/text-base/schemas.xml.svn-base
b/defensive-coding/en-US/Python/.svn/text-base/schemas.xml.svn-base
deleted file mode 100644
index 8e84245..0000000
--- a/defensive-coding/en-US/Python/.svn/text-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<locatingRules
xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
- <include rules="../../schemas.xml"/>
-</locatingRules>
diff --git a/defensive-coding/en-US/Tasks/.svn/all-wcprops
b/defensive-coding/en-US/Tasks/.svn/all-wcprops
deleted file mode 100644
index 0d902b9..0000000
--- a/defensive-coding/en-US/Tasks/.svn/all-wcprops
+++ /dev/null
@@ -1,59 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 71
-/repos/product-security/!svn/ver/294/defensive-coding/trunk/en-US/Tasks
-END
-Descriptors.xml
-K 25
-svn:wc:ra_dav:version-url
-V 87
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Tasks/Descriptors.xml
-END
-File_System.xml
-K 25
-svn:wc:ra_dav:version-url
-V 87
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Tasks/File_System.xml
-END
-schemas.xml
-K 25
-svn:wc:ra_dav:version-url
-V 83
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/Tasks/schemas.xml
-END
-Temporary_Files.xml
-K 25
-svn:wc:ra_dav:version-url
-V 91
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Tasks/Temporary_Files.xml
-END
-Locking.xml
-K 25
-svn:wc:ra_dav:version-url
-V 83
-/repos/product-security/!svn/ver/292/defensive-coding/trunk/en-US/Tasks/Locking.xml
-END
-Processes.xml
-K 25
-svn:wc:ra_dav:version-url
-V 85
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Tasks/Processes.xml
-END
-Cryptography.xml
-K 25
-svn:wc:ra_dav:version-url
-V 88
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Tasks/Cryptography.xml
-END
-Library_Design.xml
-K 25
-svn:wc:ra_dav:version-url
-V 90
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/en-US/Tasks/Library_Design.xml
-END
-Serialization.xml
-K 25
-svn:wc:ra_dav:version-url
-V 89
-/repos/product-security/!svn/ver/294/defensive-coding/trunk/en-US/Tasks/Serialization.xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/dir-prop-base
b/defensive-coding/en-US/Tasks/.svn/dir-prop-base
deleted file mode 100644
index b0e5252..0000000
--- a/defensive-coding/en-US/Tasks/.svn/dir-prop-base
+++ /dev/null
@@ -1,6 +0,0 @@
-K 10
-svn:ignore
-V 9
-snippets
-
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/entries
b/defensive-coding/en-US/Tasks/.svn/entries
deleted file mode 100644
index 5e2b13e..0000000
--- a/defensive-coding/en-US/Tasks/.svn/entries
+++ /dev/null
@@ -1,334 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/en-US/Tasks
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2012-12-19T14:04:47.671665Z
-294
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-Descriptors.xml
-file
-
-
-
-
-2013-01-10T17:17:40.559764Z
-a351aa6cb2ff552031644c821a1562d7
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-10998
-
-File_System.xml
-file
-
-
-
-
-2013-01-10T17:17:40.559764Z
-bf703da532d93a853979e09b04a2f21f
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-14682
-
-schemas.xml
-file
-
-
-
-
-2013-01-10T17:17:40.559764Z
-769bc2635d36b318161574a1adf2f6e7
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-150
-
-Temporary_Files.xml
-file
-
-
-
-
-2013-01-10T17:17:40.559764Z
-c3db39345e4baab59ab738e3912a73ca
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-10131
-
-Locking.xml
-file
-
-
-
-
-2013-01-10T17:17:40.560764Z
-f44d72a773df72e1e5f5101a3c9a66af
-2012-12-14T10:18:44.472257Z
-292
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-226
-
-Processes.xml
-file
-
-
-
-
-2013-01-10T17:17:40.560764Z
-46f3a354235a27a94fd915ebe73f3db5
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-18957
-
-Cryptography.xml
-file
-
-
-
-
-2013-01-10T17:17:40.560764Z
-dfd01ca248a464c524b4badbdce2679c
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-4180
-
-Library_Design.xml
-file
-
-
-
-
-2013-01-10T17:17:40.560764Z
-db4969b9abc8c5d9272ea395488a8896
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-7787
-
-Serialization.xml
-file
-
-
-
-
-2013-01-10T17:17:40.560764Z
-bc8c4dc03264854d83747d8f2cd1ab6f
-2012-12-19T14:04:47.671665Z
-294
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-16361
-
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/Cryptography.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/Cryptography.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/Cryptography.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/Descriptors.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/Descriptors.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/Descriptors.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/File_System.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/File_System.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/File_System.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/Library_Design.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/Library_Design.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/Library_Design.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/Locking.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/Locking.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/Locking.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/Processes.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/Processes.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/Processes.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/Serialization.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/Serialization.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/Serialization.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/Temporary_Files.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/Temporary_Files.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/Temporary_Files.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/prop-base/schemas.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/prop-base/schemas.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/prop-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/Cryptography.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/Cryptography.xml.svn-base
deleted file mode 100644
index 88f14a3..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/Cryptography.xml.svn-base
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-Tasks-Cryptography">
- <title>Cryptography</title>
-
- <section>
- <title>Primitives</title>
- <para>
- Chosing from the following cryptographic primitives is
- recommended:
- </para>
- <itemizedlist>
- <listitem><para>RSA with 2048 bit keys and
OAEP</para></listitem>
- <listitem><para>AES-128 in CBC mode</para></listitem>
- <listitem><para>SHA-256</para></listitem>
- <listitem><para>HMAC-SHA-256</para></listitem>
- <listitem><para>HMAC-SHA-1</para></listitem>
- </itemizedlist>
- <para>
- Other cryptographic algorithms can be used if they are required
- for interoperability with existing software:
- </para>
- <itemizedlist>
- <listitem><para>RSA with key sizes larger than 1024
- and legacy padding</para></listitem>
- <listitem><para>AES-192</para></listitem>
- <listitem><para>AES-256</para></listitem>
- <listitem><para>3DES (triple DES, with two or three 56 bit
keys)</para></listitem>
- <listitem><para>RC4 (but very, very strongly
discouraged)</para></listitem>
- <listitem><para>SHA-1</para></listitem>
- <listitem><para>HMAC-MD5</para></listitem>
- </itemizedlist>
- <important>
- <title>Important</title>
- <para>
- These primitives are difficult to use in a secure way. Custom
- implementation of security protocols should be avoided. For
- protecting confidentiality and integrity of network
- transmissions, TLS should be used (<xref
- linkend="chap-Defensive_Coding-TLS"/>).
- </para>
- </important>
-<!-- TODO: More algorithms are available in the NIST documents
- linked from:
http://wiki.brq.redhat.com/SecurityTechnologies/FIPS -->
- </section>
-
- <section>
- <title
id="sect-Defensive_Coding-Tasks-Cryptography-Randomness">Randomness</title>
- <para>
- The following facilities can be used to generate unpredictable
- and non-repeating values. When these functions are used without
- special safeguards, each individual rnadom value should be at
- least 12 bytes long.
- </para>
- <itemizedlist>
- <listitem>
- <para><function>PK11_GenerateRandom</function> in the NSS library
- (usable for high data rates)</para>
- </listitem>
- <listitem>
- <para><function>RAND_bytes</function> in the OpenSSL library
- (usable for high data rates)</para>
- </listitem>
- <listitem>
- <para><function>gnutls_rnd</function> in GNUTLS, with
- <literal>GNUTLS_RND_RANDOM</literal> as the first argument
- (usable for high data rates)</para>
- </listitem>
- <listitem>
- <para><type>java.security.SecureRandom</type> in Java
- (usable for high data rates)</para>
- </listitem>
- <listitem>
- <para><function>os.urandom</function> in Python</para>
- </listitem>
- <listitem>
- <para>Reading from the <filename>/dev/urandom</filename>
- character device</para>
- </listitem>
- </itemizedlist>
- <para>
- All these functions should be non-blocking, and they should not
- wait until physical randomness becomes available. (Some
- cryptography providers for Java can cause
- <type>java.security.SecureRandom</type> to block, however.)
- Those functions which do not obtain all bits directly from
- <filename>/dev/urandom</filename> are suitable for high data
- rates because they do not deplete the system-wide entropy pool.
- </para>
- <important>
- <title>Difficult to use API</title>
- <para>
- Both <function>RAND_bytes</function> and
- <function>PK11_GenerateRandom</function> have three-state
- return values (with conflicting meanings). Careful error
- checking is required. Please review the documentation when
- using these functions.
- </para>
- </important>
- <para>
- Other sources of randomness should be considered predictable.
- </para>
- <para>
- Generating randomness for cryptographic keys in long-term use
- may need different steps and is best left to cryptographic
- libraries.
- </para>
- </section>
-
-</chapter>
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/Descriptors.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/Descriptors.xml.svn-base
deleted file mode 100644
index bdf1fb2..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/Descriptors.xml.svn-base
+++ /dev/null
@@ -1,266 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="sect-Defensive_Coding-Tasks-Descriptors">
- <title>File Descriptor Management</title>
- <para>
- File descriptors underlie all input/output mechanisms offered by
- the system. They are used to implementation the <literal>FILE
- *</literal>-based functions found in
- <literal><stdio.h></literal>, and all the file and network
- communication facilities provided by the Python and Java
- environments are eventually implemented in them.
- </para>
- <para>
- File descriptors are small, non-negative integers in userspace,
- and are backed on the kernel side with complicated data structures
- which can sometimes grow very large.
- </para>
- <section>
- <title>Closing descriptors</title>
- <para>
- If a descriptor is no longer used by a program and is not closed
- explicitly, its number cannot be reused (which is problematic in
- itself, see <xref
- linkend="sect-Defensive_Coding-Tasks-Descriptors-Limit"/>), and
- the kernel resources are not freed. Therefore, it is important
- to close all descriptors at the earlierst point in time
- possible, but not earlier.
- </para>
- <section>
- <title>Error handling during descriptor close</title>
- <para>
- The <function>close</function> system call is always
- successful in the sense that the passed file descriptor is
- never valid after the function has been called. However,
- <function>close</function> still can return an error, for
- example if there was a file system failure. But this error is
- not very useful because the absence of an error does not mean
- that all caches have been emptied and previous writes have
- been made durable. Programs which need such guarantees must
- open files with <literal>O_SYNC</literal> or use
- <literal>fsync</literal> or <literal>fdatasync</literal>, and
- may also have to <literal>fsync</literal> the directory
- containing the file.
- </para>
- </section>
- <section>
- <title>Closing descriptors and race conditions</title>
- <para>
- Unlike process IDs, which are recycle only gradually, the
- kernel always allocates the lowest unused file descriptor when
- a new descriptor is created. This means that in a
- multi-threaded program which constantly opens and closes file
- descriptors, descriptors are reused very quickly. Unless
- descriptor closing and other operations on the same file
- descriptor are synchronized (typically, using a mutex), there
- will be race coniditons and I/O operations will be applied to
- the wrong file descriptor.
- </para>
- <para>
- Sometimes, it is necessary to close a file descriptor
- concurrently, while another thread might be about to use it in
- a system call. In order to support this, a program needs to
- create a single special file descriptor, one on which all I/O
- operations fail. One way to achieve this is to use
- <function>socketpair</function>, close one of the descriptors,
- and call <literal>shutdown(fd, SHUTRDWR)</literal> on the
- other.
- </para>
- <para>
- When a descriptor is closed concurrently, the program does not
- call <function>close</function> on the descriptor. Instead it
- program uses <function>dup2</function> to replace the
- descriptor to be closed with the dummy descriptor created
- earlier. This way, the kernel will not reuse the descriptor,
- but it will carry out all other steps associated with calling
- a descriptor (for instance, if the descriptor refers to a
- stream socket, the peer will be notified).
- </para>
- <para>
- This is just a sketch, and many details are missing.
- Additional data structures are needed to determine when it is
- safe to really close the descriptor, and proper locking is
- required for that.
- </para>
- </section>
- <section>
- <title>Lingering state after close</title>
- <para>
- By default, closing a stream socket returns immediately, and
- the kernel will try to send the data in the background. This
- means that it is impossible to implement accurate accounting
- of network-related resource utilization from userspace.
- </para>
- <para>
- The <literal>SO_LINGER</literal> socket option alters the
- behavior of <function>close</function>, so that it will return
- only after the lingering data has been processed, either by
- sending it to the peer successfully, or by discarding it after
- the configured timeout. However, there is no interface which
- could perform this operation in the background, so a separate
- userspace thread is needed for each <function>close</function>
- call, causing scalability issues.
- </para>
- <para>
- Currently, there is no application-level countermeasure which
- applies universally. Mitigation is possible with
- <application>iptables</application> (the
- <literal>connlimit</literal> match type in particular) and
- specialized filtering devices for denial-of-service network
- traffic.
- </para>
- <para>
- These problems are not related to the
- <literal>TIME_WAIT</literal> state commonly seen in
- <application>netstat</application> output. The kernel
- automatically expires such sockets if necessary.
- </para>
- </section>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Descriptors-Child_Processes">
- <title>Preventing file descriptor leaks to child processes</title>
- <para>
- Child processes created with <function>fork</function> share
- the initial set of file descriptors with their parent
- process. By default, file descriptors are also preserved if
- a new process image is created with <function>execve</function>
- (or any of the other functions such as <function>system</function>
- or <function>posix_spawn</function>).
- </para>
- <para>
- Usually, this behavior is not desirable. There are two ways to
- turn it off, that is, to prevent new process images from
- inheriting the file descriptors in the parent process:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Set the close-on-exec flag on all newly created file
- descriptors. Traditionally, this flag is controlled by the
- <literal>FD_CLOEXEC</literal> flag, using
- <literal>F_GETFD</literal> and <literal>F_SETFD</literal>
- operations of the <function>fcntl</function> function.
- </para>
- <para>
- However, in a multi-threaded process, there is a race
- condition: a subprocess could have been created between the
- time the descriptor was created and the
- <literal>FD_CLOEXEC</literal> was set. Therefore, many system
- calls which create descriptors (such as
- <function>open</function> and <function>openat</function>)
- now accept the <function>O_CLOEXEC</function> flag
- (<function>SOCK_CLOEXEC</function> for
- <function>socket</function> and
- <function>socketpair</function>), which cause the
- <literal>FD_CLOEXEC</literal> flag to be set for the file
- descriptor in an atomic fashion. In addition, a few new
- systems calls were introduced, such as
- <function>pipe2</function> and <function>dup3</function>.
- </para>
- <para>
- The downside of this approach is that every descriptor needs
- to receive special treatment at the time of creation,
- otherwise it is not completely effective.
- </para>
- </listitem>
- <listitem>
- <para>
- After calling <function>fork</function>, but before creating
- a new process image with <function>execve</function>, all
- file descriptors which the child process will not need are
- closed.
- </para>
- <para>
- Traditionally, this was implemented as a loop over file
- descriptors ranging from <literal>3</literal> to
- <literal>255</literal> and later <literal>1023</literal>.
- But this is only an approximatio because it is possible to
- create file descriptors outside this range easily (see <xref
- linkend="sect-Defensive_Coding-Tasks-Descriptors-Limit"/>).
- Another approach reads <filename>/proc/self/fd</filename>
- and closes the unexpected descriptors listed there, but this
- approach is much slower.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- At present, environments which care about file descriptor
- leakage implement the second approach. OpenJDK 6 and 7
- are among them.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Descriptors-Limit">
- <title>Dealing with the <function>select</function>
limit</title>
- <para>
- By default, a user is allowed to open only 1024 files in a
- single process, but the system administrator can easily change
- this limit (which is necessary for busy network servers).
- However, there is another restriction which is more difficult to
- overcome.
- </para>
- <para>
- The <function>select</function> function only supports a
- maximum of <literal>FD_SETSIZE</literal> file descriptors
- (that is, the maximum permitted value for a file descriptor
- is <literal>FD_SETSIZE - 1</literal>, usually 1023.) If a
- process opens many files, descriptors may exceed such
- limits. It is impossible to query such descriptors using
- <function>select</function>.
- </para>
- <para>
- If a library which creates many file descriptors is used in
- the same process as a library which uses
- <function>select</function>, at least one of them needs to
- be changed. <!-- ??? refer to event-driven programming -->
- Calls to <function>select</function> can be replaced with
- calls to <function>poll</function> or another event handling
- mechanism.
- </para>
- <para>
- Alternatively, the library with high descriptor usage can
- relocate descriptors above the <literal>FD_SETSIZE</literal>
- limit using the following procedure.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Create the file descriptor <literal>fd</literal> as
- usual, preferably with the <literal>O_CLOEXEC</literal>
- flag.
- </para>
- </listitem>
- <listitem>
- <para>
- Before doing anything else with the descriptor
- <literal>fd</literal>, invoke:
- </para>
- <programlisting language="C">
- int newfd = fcntl(fd, F_DUPFD_CLOEXEC, (long)FD_SETSIZE);
- </programlisting>
- </listitem>
- <listitem>
- <para>
- Check that <literal>newfd</literal> result is
- non-negative, otherwise close <literal>fd</literal> and
- report an error, and return.
- </para>
- </listitem>
- <listitem>
- <para>
- Close <literal>fd</literal> and continue to use
- <literal>newfd</literal>.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The new descriptor has been allocated above the
- <literal>FD_SETSIZE</literal>. Even though this algorithm
- is racy in the sense that the <literal>FD_SETSIZE</literal>
- first descriptors could fill up, a very high degree of
- physical parallelism is required before this becomes a problem.
- </para>
- </section>
-</chapter>
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/File_System.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/File_System.xml.svn-base
deleted file mode 100644
index ee3eb17..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/File_System.xml.svn-base
+++ /dev/null
@@ -1,339 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-Tasks-File_System">
- <title>File system manipulation</title>
- <para>
- In this chapter, we discuss general file system manipulation, with
- a focus on access files and directories to which an other,
- potentially untrusted user has write access.
- </para>
- <para>
- Temporary files are covered in their own chapter, <xref
- linkend="chap-Defensive_Coding-Tasks-Temporary_Files"/>.
- </para>
- <section id="sect-Defensive_Coding-Tasks-File_System-Unowned">
- <title>Working with files and directories owned by other users</title>
- <para>
- Sometimes, it is necessary to operate on files and directories
- owned by other (potentially untrusted) users. For example, a
- system administrator could remove the home directory of a user,
- or a package manager could update a file in a directory which is
- owned by an application-specific user. This differs from
- accessing the file system as a specific user; see
- <xref linkend="sect-Defensive_Coding-Tasks-File_System-Foreign"/>.
- </para>
- <para>
- Accessing files across trust boundaries faces several
- challenges, particularly if an entire directory tree is being
- traversed:
- </para>
- <orderedlist>
- <listitem>
- <para>
- Another user might add file names to a writable directory at
- any time. This can interfere with file creation and the
- order of names returned by <function>readdir</function>.
- </para>
- </listitem>
- <listitem>
- <para>
- Merely opening and closing a file can have side effects.
- For instance, an automounter can be triggered, or a tape
- device rewound. Opening a file on a local file system can
- block indefinitely, due to mandatory file locking, unless
- the <literal>O_NONBLOCK</literal> flag is specified.
- </para>
- </listitem>
- <listitem>
- <para>
- Hard links and symbolic links can redirect the effect of
- file system operations in unexpected ways. The
- <literal>O_NOFOLLOW</literal> and
- <literal>AT_SYMLINK_NOFOLLOW</literal> variants of system
- calls only affected final path name component.
- </para>
- </listitem>
- <listitem>
- <para>
- The structure of a directory tree can change. For example,
- the parent directory of what used to be a subdirectory
- within the directory tree being processed could suddenly
- point outside that directory tree.
- </para>
- </listitem>
- </orderedlist>
- <para>
- Files should always be created with the
- <literal>O_CREAT</literal> and <literal>O_EXCL</literal>
flags,
- so that creating the file will fail if it already exists. This
- guards against the unexpected appearance of file names, either
- due to creation of a new file, or hard-linking of an existing
- file. In multi-threaded programs, rather than manipulating the
- umask, create the files with mode <literal>000</literal> if
- possible, and adjust it afterwards with
- <function>fchmod</function>.
- </para>
- <para>
- To avoid issues related to symbolic links and directory tree
- restructuring, the “<literal>at</literal>” variants of system
- calls have to be used (that is, functions like
- <function>openat</function>,
<function>fchownat</function>,
- <function>fchmodat</function>, and
- <function>unlinkat</function>, together with
- <literal>O_NOFOLLOW</literal> or
- <literal>AT_SYMLINK_NOFOLLOW</literal>). Path names passed to
- these functions must have just a single component (that is,
- without a slash). When descending, the descriptors of parent
- directories must be kept open. The missing
- <literal>opendirat</literal> function can be emulated with
- <literal>openat</literal> (with an
- <literal>O_DIRECTORY</literal> flag, to avoid opening special
- files with side effects), followed by
- <literal>fdopendir</literal>.
- </para>
- <para>
- If the “<literal>at</literal>” functions are not available, it
- is possible to emulate them by changing the current directory.
- (Obviously, this only works if the process is not multi-threaded.)
- <function>fchdir</function> has to be used to change the current
- directory, and the descriptors of the parent directories have to
- be kept open, just as with the “<literal>at</literal>”-based
- approach. <literal>chdir("...")</literal> is unsafe because
it
- might ascend outside the intended directory tree.
- </para>
- <para>
- This “<literal>at</literal>” function emulation is currently
- required when manipulating extended attributes. In this case,
- the <function>lsetxattr</function> function can be used, with a
- relative path name consisting of a single component. This also
- applies to SELinux contexts and the
- <function>lsetfilecon</function> function.
- </para>
- <para>
- Currently, it is not possible to avoid opening special files
- <emphasis>and</emphasis> changes to files with hard links if the
- directory containing them is owned by an untrusted user.
- (Device nodes can be hard-linked, just as regular files.)
- <function>fchmodat</function> and
<function>fchownat</function>
- affect files whose link count is greater than one. But opening
- the files, checking that the link count is one with
- <function>fstat</function>, and using
- <function>fchmod</function> and <function>fchown</function>
on
- the file descriptor may have unwanted side effects, due to item
- 2 above. When creating directories, it is therefore important
- to change the ownership and permissions only after it has been
- fully created. Until that point, file names are stable, and no
- files with unexpected hard links can be introduced.
- </para>
- <para>
- Similarly, when just reading a directory owned by an untrusted
- user, it is currently impossible to reliably avoid opening
- special files.
- </para>
- <para>
- There is no workaround against the instability of the file list
- returned by <function>readdir</function>. Concurrent
- modification of the directory can result in a list of files
- being returned which never actually existed on disk.
- </para>
- <para>
- Hard links and symbolic links can be safely deleted using
- <function>unlinkat</function> without further checks because
- deletion only affects the name within the directory tree being
- processed.
- </para>
- </section>
- <section id="sect-Defensive_Coding-Tasks-File_System-Foreign">
- <title>Accessing the file system as a different user</title>
- <para>
- This section deals with access to the file system as a specific
- user. This is different from accessing files and directories owned by a
- different, potentially untrusted user; see <xref
- linkend="sect-Defensive_Coding-Tasks-File_System-Foreign"/>.
- </para>
- <para>
- One approach is to spawn a child process which runs under the
- target user and group IDs (both effective and real IDs). Note
- that this child process can block indefinitely, even when
- processing regular files only. For example, a special FUSE file
- system could cause the process to hang in uninterruptible sleep
- inside a <function>stat</function> system call.
- </para>
- <para>
- An existing process could change its user and group ID using
- <function>setfsuid</function> and
<function>setfsgid</function>.
- (These functions are preferred over <function>seteuid</function>
- and <function>setegid</function> because they do not allow the
- impersonated user to send signals to the process.) These
- functions are not thread safe. In multi-threaded processes,
- these operations need to be performed in a single-threaded child
- process. Unexpected blocking may occur as well.
- </para>
- <para>
- It is not recommended to try to reimplement the kernel
- permission checks in user space because the required checks are
- complex. It is also very difficult to avoid race conditions
- during path name resolution.
- </para>
- </section>
- <section id="sect-Defensive_Coding-Tasks-File_System-Limits">
- <title>File system limits</title>
- <para>
- For historical reasons, there are preprocessor constants such as
- <literal>PATH_MAX</literal>, <literal>NAME_MAX</literal>.
- However, on most systems, the length of canonical path names
- (absolute path names with all symbolic links resolved, as
- returned by <function>realpath</function> or
- <function>canonicalize_file_name</function>) can exceed
- <literal>PATH_MAX</literal> bytes, and individual file name
- components can be longer than <literal>NAME_MAX</literal>. This
- is also true of the <literal>_PC_PATH_MAX</literal> and
- <literal>_PC_NAME_MAX</literal> values returned by
- <function>pathconf</function>, and the
- <literal>f_namemax</literal> member of <literal>struct
- statvfs</literal>. Therefore, these constants should not be
- used. This is also reason why the
- <function>readdir_r</function> should never be used (instead,
- use <function>readdir</function>).
- </para>
- <para>
- You should not write code in a way that assumes that there is an
- upper limit on the number of subdirectories of a directory, the
- number of regular files in a directory, or the link count of an
- inode.
- </para>
- </section>
- <section id="sect-Defensive_Coding-Tasks-File_System-Features">
- <title>File system features</title>
- <para>
- Not all file systems support all features. This makes it very
- difficult to write general-purpose tools for copying files. For
- example, a copy operation intending to preserve file permissions
- will generally fail when copying to a FAT file system.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Some file systems are case-insensitive. Most should be
- case-preserving, though.
- </para>
- </listitem>
- <listitem>
- <para>
- Name length limits vary greatly, from eight to thousands of
- bytes. Path length limits differ as well. Most systems
- impose an upper bound on path names passed to the kernel,
- but using relative path names, it is possible to create and
- access files whose absolute path name is essentially of
- unbounded length.
- </para>
- </listitem>
- <listitem>
- <para>
- Some file systems do not store names as fairly unrestricted
- byte sequences, as it has been traditionally the case on GNU
- systems. This means that some byte sequences (outside the
- POSIX safe character set) are not valid names. Conversely,
- names of existing files may not be representable as byte
- sequences, and the files are thus inaccessible on GNU
- systems. Some file systems perform Unicode canonicalization
- on file names. These file systems preserve case, but
- reading the name of a just-created file using
- <function>readdir</function> might still result in a
- different byte sequence.
- </para>
- </listitem>
- <listitem>
- <para>
- Permissions and owners are not universally supported (and
- SUID/SGID bits may not be available). For example, FAT file
- systems assign ownership based on a mount option, and
- generally mark all files as executable. Any attempt to
- change permissions would result in an error.
- </para>
- </listitem>
- <listitem>
- <para>
- Non-regular files (device nodes, FIFOs) are not generally
- available.
- </para>
- </listitem>
- <listitem>
- <para>
- Only on some file systems, files can have holes, that is,
- not all of their contents is backed by disk storage.
- </para>
- </listitem>
- <listitem>
- <para>
- <function>ioctl</function> support (even fairly generic
- functionality such as <literal>FIEMAP</literal> for
- discovering physical file layout and holes) is
- file-system-specific.
- </para>
- </listitem>
- <listitem>
- <para>
- Not all file systems support extended attributes, ACLs and
- SELinux metadata. Size and naming restriction on extended
- attributes vary.
- </para>
- </listitem>
- <listitem>
- <para>
- Hard links may not be supported at all (FAT) or only within
- the same directory (AFS). Symbolic links may not be
- available, either. Reflinks (hard links with copy-on-write
- semantics) are still very rare. Recent systems restrict
- creation of hard links to users which own the target file or
- have read/write access to it, but older systems do not.
- </para>
- </listitem>
- <listitem>
- <para>
- Renaming (or moving) files using <function>rename</function>
- can fail (even when <function>stat</function> indicates that
- the source and target directories are located on the same
- file system). This system call should work if the old and
- new paths are located in the same directory, though.
- </para>
- </listitem>
- <listitem>
- <para>
- Locking semantics vary among file systems. This affects
- advisory and mandatory locks. For example, some network
- file systems do not allow deleting files which are opened by
- any process.
- </para>
- </listitem>
- <listitem>
- <para>
- Resolution of time stamps varies from two seconds to
- nanoseconds. Not all time stamps are available on all file
- systems. File creation time (<emphasis>birth
- time</emphasis>) is not exposed over the
- <function>stat</function>/<function>fstat</function>
- interface, even if stored by the file system.
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="sect-Defensive_Coding-Tasks-File_System-Free_Space">
- <title>Checking free space</title>
- <para>
- The <function>statvfs</function> and
- <function>fstatvfs</function> functions allow programs to
- examine the number of available blocks and inodes, through the
- members <literal>f_bfree</literal>,
<literal>f_bavail</literal>,
- <literal>f_ffree</literal>, and <literal>f_favail</literal>
of
- <literal>struct statvfs</literal>. Some file systems return
- fictional values in the <literal>f_ffree</literal> and
- <literal>f_favail</literal> fields, so the only reliable way to
- discover if the file system still has space for a file is to try
- to create it. The <literal>f_bfree</literal> field should be
- reasonably accurate, though.
- </para>
- </section>
-</chapter>
-
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/Library_Design.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/Library_Design.xml.svn-base
deleted file mode 100644
index 7c959ab..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/Library_Design.xml.svn-base
+++ /dev/null
@@ -1,195 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-Tasks-Library_Design">
- <title>Library Design</title>
- <para>
- Throught this section, the term <emphasis>client code</emphasis>
- refers to applications and other libraries using the library.
- </para>
-
- <section>
- <title>State management</title>
- <para>
- </para>
- <section>
- <title>Global state</title>
- <para>
- Global state should be avoided.
- </para>
- <para>
- If this is impossible, the global state must be protected with
- a lock. For C/C++, you can use the
- <function>pthread_mutex_lock</function>
- and <function>pthread_mutex_unlock</function>
- functions without linking against <literal>-lpthread</literal>
- because the system provides stubs for non-threaded processes.
- </para>
- <para>
- For compatibility with <function>fork</function>, these locks
- should be acquired and released in helpers registered with
- <function>pthread_atfork</function>. This function is not
- available without <literal>-lpthread</literal>, so you need to
- use <function>dlsym</function> or a weak symbol to obtain its
- address.
- </para>
- <para>
- If you need <function>fork</function> protection for other
- reasons, you should store the process ID and compare it to the
- value returned by <function>getpid</function> each time you
- access the global state. (<function>getpid</function> is not
- implemented as a system call and is fast.) If the value
- changes, you know that you have to re-create the state object.
- (This needs to be combined with locking, of course.)
- </para>
- </section>
- <section>
- <title>Handles</title>
- <para>
- Library state should be kept behind a curtain. Client code
- should receive only a handle. In C, the handle can be a
- pointer to an incomplete <literal>struct</literal>. In C++,
- the handle can be a pointer to an abstract base class, or it
- can be hidden using the pointer-to-implementation idiom.
- </para>
- <para>
- The library should provide functions for creating and
- destroying handles. (In C++, it is possible to use virtual
- destructors for the latter.) Consistency between creation and
- destruction of handles is strongly recommended: If the client
- code created a handle, it is the responsibility of the client
- code to destroy it. (This is not always possible or
- convenient, so sometimes, a transfer of ownership has to
- happen.)
- </para>
- <para>
- Using handles ensures that it is possible to change the way
- the library represents state in a way that is transparent to
- client code. This is important to facilitate security updates
- and many other code changes.
- </para>
- <para>
- It is not always necessary to protect state behind a handle
- with a lock. This depends on the level of thread safety
- the library provides.
- </para>
- </section>
- </section>
-
- <section>
- <title>Object orientation</title>
- <para>
- Classes should be either designed as base classes, or it should
- be impossible to use them as base classes (like
- <literal>final</literal> classes in Java). Classes which are
- not designed for inheritance and are used as base classes
- nevertheless create potential maintenance hazards because it is
- difficult to predict how client code will react when calls to
- virtual methods are added, reordered or removed.
- </para>
- <para>
- Virtual member functions can be used as callbacks. See
- <xref
linkend="sect-Defensive_Coding-Tasks-Library_Design-Callbacks"/>
- for some of the challenges involved.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Library_Design-Callbacks">
- <title>Callbacks</title>
- <para>
- Higher-order code is difficult to analyze for humans and
- computers alike, so it should be avoided. Often, an
- iterator-based interface (a library function which is called
- repeatedly by client code and returns a stream of events) leads
- to a better design which is easier to document and use.
- </para>
- <para>
- If callbacks are unavoidable, some guidelines for them follow.
- </para>
- <para>
- In modern C++ code, <literal>std::function</literal> objects
- should be used for callbacks.
- </para>
- <para>
- In older C++ code and in C code, all callbacks must have an
- additional closure parameter of type <literal>void *</literal>,
- the value of which can be specified by client code. If
- possible, the value of the closure parameter should be provided
- by client code at the same time a specific callback is
- registered (or specified as a function argument). If a single
- closure parameter is shared by multiple callbacks, flexibility
- is greatly reduced, and conflicts between different pieces of
- client code using the same library object could be unresolvable.
- In some cases, it makes sense to provide a de-registration
- callback which can be used to destroy the closure parameter when
- the callback is no longer used.
- </para>
- <para>
- Callbacks can throw exceptions or call
- <function>longjmp</function>. If possible, all library objects
- should remain in a valid state. (All further operations on them
- can fail, but it should be possible to deallocate them without
- causing resource leaks.)
- </para>
- <para>
- The presence of callbacks raises the question if functions
- provided by the library are <emphasis>reentrant</emphasis>.
- Unless a library was designed for such use, bad things will
- happen if a callback function uses functions in the same library
- (particularly if they are invoked on the same objects and
- manipulate the same state). When the callback is invoked, the
- library can be in an inconsistent state. Reentrant functions
- are more difficult to write than thread-safe functions (by
- definition, simple locking would immediately lead to deadlocks).
- It is also difficult to decide what to do when destruction of an
- object which is currently processing a callback is requested.
- </para>
- </section>
-
- <section>
- <title>Process attributes</title>
- <para>
- Several attributes are global and affect all code in the
- process, not just the library that manipulates them.
- </para>
- <itemizedlist>
- <listitem><para>
- environment variables
- (see <xref linkend="sect-Defensive_Coding-Tasks-secure_getenv"/>)
- </para></listitem>
- <listitem><para>
- umask
- </para></listitem>
- <listitem><para>
- user IDs, group IDs and capabilities
- </para></listitem>
- <listitem><para>
- current working directory
- </para></listitem>
- <listitem><para>
- signal handlers, signal masks and signal delivery
- </para></listitem>
- <listitem><para>
- file locks (especially <function>fcntl</function> locks
- behave in surprising ways, not just in a multi-threaded
- environment)
- </para></listitem>
- </itemizedlist>
- <para>
- Library code should avoid manipulating these global process
- attributes. It should not rely on environment variables, umask,
- the current working directory and signal masks because these
- attributes can be inherted from an untrusted source.
- </para>
- <para>
- In addition, there are obvious process-wide aspects such as the
- virtual memory layout, the set of open files and dynamic shared
- objects, but with the exception of shared objects, these can be
- manipulated in a relatively isolated way.
- </para>
-
- </section>
-
-</chapter>
-
-
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/Locking.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/Locking.xml.svn-base
deleted file mode 100644
index f85e61e..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/Locking.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="sect-Defensive_Coding-Tasks-Locking">
-</chapter>
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/Processes.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/Processes.xml.svn-base
deleted file mode 100644
index 90f01f0..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/Processes.xml.svn-base
+++ /dev/null
@@ -1,483 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="sect-Defensive_Coding-Tasks-Processes">
- <title>Processes</title>
-
- <section id="sect-Defensive_Coding-Tasks-Processes-Creation">
- <title>Safe process creation</title>
- <para>
- This section describes how to create new child processes in a
- safe manner. In addition to the concerns addressed below, there
- is the possibility of file descriptor leaks, see <xref
- linkend="sect-Defensive_Coding-Tasks-Descriptors-Child_Processes"/>.
- </para>
- <section>
- <title>Obtaining the program path and the command line
- template</title>
- <para>
- The name and path to the program being invoked should be
- hard-coded or controlled by a static configuration file stored
- at a fixed location (at an file system absolute path). The
- same applies to the template for generating the command line.
- </para>
- <para>
- The configured program name should be an absolute path. If it
- is a relative path, the contents of the <envar>PATH</envar>
- must be obtained in s secure manner (see <xref
- linkend="sect-Defensive_Coding-Tasks-secure_getenv"/>).
- If the <envar>PATH</envar> variable is not set or untrusted,
- the safe default <literal>/bin:/usr/bin</literal> must be
- used.
- </para>
- <para>
- If too much flexibility is provided here, it may allow
- invocation of arbitrary programs without proper authorization.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Processes-execve">
- <title>Bypassing the shell</title>
- <para>
- Child processes should be created without involving the system
- shell.
- </para>
- <para>
- For C/C++, <function>system</function> should not be used.
- The <function>posix_spawn</function> function can be used
- instead, or a combination <function>fork</function> and
- <function>execve</function>. (In some cases, it may be
- preferable to use <function>vfork</function> or the
- Linux-specific <function>clone</function> system call instead
- of <function>fork</function>.)
- </para>
- <para>
- In Python, the <literal>subprocess</literal> module bypasses
- the shell by default (when the <literal>shell</literal>
- keyword argument is not set to true).
- <function>os.system</function> should not be used.
- </para>
- <para>
- The Java class <type>java.lang.ProcessBuilder</type> can be
- used to create subprocesses without interference from the
- system shell.
- </para>
- <important>
- <title>Portability notice</title>
- <para>
- On Windows, there is no argument vector, only a single
- argument string. Each application is responsible for parsing
- this string into an argument vector. There is considerable
- variance among the quoting style recognized by applications.
- Some of them expand shell wildcards, others do not. Extensive
- application-specific testing is required to make this secure.
- </para>
- </important>
- <para>
- Note that some common applications (notably
- <application>ssh</application>) unconditionally introduce the
- use of a shell, even if invoked directly without a shell. It is
- difficult to use these applications in a secure manner. In this
- case, untrusted data should be supplied by other means. For
- example, standard input could be used, instead of the command
- line.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Processes-environ">
- <title>Specifying the process environment</title>
- <para>
- Child processes should be created with a minimal set of
- environment variables. This is absolutely essential if there
- is a trust transition involved, either when the parent process
- was created, or during the creation of the child process.
- </para>
- <para>
- In C/C++, the environment should be constructed as an array of
- strings and passed as the <varname>envp</varname> argument to
- <function>posix_spawn</function> or
<function>execve</function>.
- The functions <function>setenv</function>,
- <function>unsetenv</function> and <function>putenv</function>
- should not be used. They are not thread-safe and suffer from
- memory leaks.
- </para>
- <para>
- Python programs need to specify a <literal>dict</literal> for
- the the <varname>env</varname> argument of the
- <function>subprocess.Popen</function> constructor.
- The Java class <literal>java.lang.ProcessBuilder</literal>
- provides a <function>environment()</function> method,
- which returns a map that can be manipulated.
- </para>
- <para>
- The following list provides guidelines for selecting the set
- of environment variables passed to the child process.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <envar>PATH</envar> should be initialized to
- <literal>/bin:/usr/bin</literal>.
- </para>
- </listitem>
- <listitem>
- <para>
- <envar>USER</envar> and <envar>HOME</envar> can be
inhereted
- from the parent process environment, or they can be
- initialized from the <literal>pwent</literal> structure
- for the user. <!-- ??? refer to dropping privileges -->
- </para>
- </listitem>
- <listitem>
- <para>The <envar>DISPLAY</envar> and
<envar>XAUTHORITY</envar>
- variables should be passed to the subprocess if it is an X
- program. Note that this will typically not work across trust
- boundaries because <envar>XAUTHORITY</envar> refers to a file
- with <literal>0600</literal> permissions.
- </para>
- </listitem>
- <listitem>
- <para>
- The location-related environment variables
- <envar>LANG</envar>, <envar>LANGUAGE</envar>,
- <envar>LC_ADDRESS</envar>, <envar>LC_ALL</envar>,
- <envar>LC_COLLATE</envar>, <envar>LC_CTYPE</envar>,
- <envar>LC_IDENTIFICATION</envar>,
- <envar>LC_MEASUREMENT</envar>, <envar>LC_MESSAGES</envar>,
- <envar>LC_MONETARY</envar>, <envar>LC_NAME</envar>,
- <envar>LC_NUMERIC</envar>, <envar>LC_PAPER</envar>,
- <envar>LC_TELEPHONE</envar> and <envar>LC_TIME</envar>
- can be passed to the subprocess if present.
- </para>
- </listitem>
- <listitem>
- <para>
- The called process may need application-specific
- environment variables, for example for passing passwords.
- (See <xref
-
linkend="sect-Defensive_Coding-Tasks-Processes-Command_Line_Visibility"/>.)
- </para>
- </listitem>
- <listitem>
- <para>
- All other environment variables should be dropped. Names
- for new environment variables should not be accepted from
- untrusted sources.
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section>
- <title>Robust argument list processing</title>
- <para>
- When invoking a program, it is sometimes necessary to include
- data from untrusted sources. Such data should be check
- against embedded <literal>NUL</literal> characters because the
- system APIs will sliently truncate argument strings at the first
- <literal>NUL</literal> character.
- </para>
- <para>
- The following recommendations assume that the program being
- invoked uses GNU-style option processing using
- <function>getopt_long</function>. This convention is widely
- used, but it is just that, and individual programs might
- interpret a command line in a different way.
- </para>
- <para>
- If the untrusted data has to go into an option, use the
- <literal>--option-name=VALUE</literal> syntax, placing the
- option and its value into the same command line argument.
- This avoids any potential confusion if the data starts with
- <literal>-</literal>.
- </para>
- <para>
- For positional arguments, terminate the option list with a
- single <option>--</option> marker after the last option, and
- include the data at the right position. The
- <option>--</option> marker terminates option processing, and
- the data will not be treated as an option even if it starts
- with a dash.
- </para>
- </section>
-
- <section
id="sect-Defensive_Coding-Tasks-Processes-Command_Line_Visibility">
- <title>Passing secrets to subprocesses</title>
- <para>
- The command line (the name of the program and its argument) of
- a running process is traditionally available to all local
- users. The called program can overwrite this information, but
- only after it has run for a bit of time, during which the
- information may have been read by other processes. However,
- on Linux, the process environment is restricted to the user
- who runs the process. Therefore, if you need a convenient way
- to pass a password to a child process, use an environment
- variable, and not a command line argument. (See <xref
- linkend="sect-Defensive_Coding-Tasks-Processes-environ"/>.)
- </para>
- <important>
- <title>Portability notice</title>
- <para>
- On some UNIX-like systems (notably Solaris), environment
- variables can be read by any system user, just like command
- lines.
- </para>
- </important>
- <para>
- If the environment-based approach cannot be used due to
- portability concerns, the data can be passed on standard
- input. Some programs (notably <application>gpg</application>)
- use special file descriptors whose numbers are specified on
- the command line. Temporary files are an option as well, but
- they might give digital forensics access to sensitive data
- (such as passphrases) because it is difficult to safely delete
- them in all cases.
- </para>
- </section>
- </section>
-
- <section>
- <title>Handling child process termination</title>
- <para>
- When child processes terminate, the parent process is signalled.
- A stub of the terminated processes (a
- <emphasis>zombie</emphasis>, shown as
- <literal><defunct></literal> by
- <application>ps</application>) is kept around until the status
- information is collected (<emphasis>reaped</emphasis>) by the
- parent process. Over the years, several interfaces for this
- have been invented:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The parent process calls <function>wait</function>,
- <function>waitpid</function>, <function>waitid</function>,
- <function>wait3</function> or <function>wait4</function>,
- without specifying a process ID. This will deliver any
- matching process ID. This approach is typically used from
- within event loops.
- </para>
- </listitem>
- <listitem>
- <para>
- The parent process calls <function>waitpid</function>,
- <function>waitid</function>, or <function>wait4</function>,
- with a specific process ID. Only data for the specific
- process ID is returned. This is typically used in code
- which spawns a single subprocess in a synchronous manner.
- </para>
- </listitem>
- <listitem>
- <para>
- The parent process installs a handler for the
- <literal>SIGCHLD</literal> signal, using
- <function>sigaction</function>, and specifies to the
- <literal>SA_NOCLDWAIT</literal> flag.
- This approach could be used by event loops as well.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- None of these approaches can be used to wait for child process
- terminated in a completely thread-safe manner. The parent
- process might execute an event loop in another thread, which
- could pick up the termination signal. This means that libraries
- typically cannot make free use of child processes (for example,
- to run problematic code with reduced privileges in a separate
- address space).
- </para>
- <para>
- At the moment, the parent process should explicitly wait for
- termination of the child process using
- <function>waitpid</function> or
<function>waitpid</function>,
- and hope that the status is not collected by an event loop
- first.
- </para>
- </section>
-
- <section>
- <title><literal>SUID</literal>/<literal>SGID</literal>
- processes</title>
- <!-- ??? need to document real vs effective UID -->
- <para>
- Programs can be marked in the file system to indicate to the
- kernel that a trust transition should happen if the program is
- run. The <literal>SUID</literal> file permission bit indicates
- that an executable should run with the effective user ID equal
- to the owner of the executable file. Similarly, with the
- <literal>SGID</literal> bit, the effective group ID is set to
- the group of the executable file.
- </para>
- <para>
- Linux supports <emphasis>fscaps</emphasis>, which can grant
- additional capabilities to a process in a finer-grained manner.
- Additional mechanisms can be provided by loadable security
- modules.
- </para>
- <para>
- When such a trust transition has happened, the process runs in a
- potentially hostile environment. Additional care is necessary
- not to rely on any untrusted information. These concerns also
- apply to libraries which can be linked into such processes.
- </para>
-
- <section id="sect-Defensive_Coding-Tasks-secure_getenv">
- <title>Accessing environment variables</title>
- <para>
- The following steps are required so that a program does not
- accidentally pick up untrusted data from environment
- variables.
- </para>
- <itemizedlist>
- <listitem><para>
- Compile your C/C++ sources with <literal>-D_GNU_SOURCE</literal>.
- The Autoconf macro <literal>AC_GNU_SOURCE</literal> ensures this.
- </para></listitem>
- <listitem><para>
- Check for the presence of the <function>secure_getenv</function>
- and <function>__secure_getenv</function> function. The Autoconf
- directive <literal>AC_CHECK_FUNCS([__secure_getenv
secure_getenv])</literal>
- performs these checks.
- </para></listitem>
- <listitem><para>
- Arrange for a proper definition of the
- <function>secure_getenv</function> function. See <xref
- linkend="ex-Defensive_Coding-Tasks-secure_getenv"/>.
- </para></listitem>
- <listitem><para>
- Use <function>secure_getenv</function> instead of
- <function>getenv</function> to obtain the value of critical
- environment variables. <function>secure_getenv</function>
- will pretend the variable has not bee set if the process
- environment is not trusted.
- </para></listitem>
- </itemizedlist>
- <para>
- Critical environment variables are debugging flags,
- configuration file locations, plug-in and log file locations,
- and anything else that might be used to bypass security
- restrictions or cause a privileged process to behave in an
- unexpected way.
- </para>
- <para>
- Either the <function>secure_getenv</function> function or the
- <function>__secure_getenv</function> is available from GNU libc.
- </para>
- <example id="ex-Defensive_Coding-Tasks-secure_getenv">
- <title>Obtaining a definition for
<function>secure_getenv</function></title>
- <programlisting language="C">
-<![CDATA[
-#include <stdlib.h>
-
-#ifndef HAVE_SECURE_GETENV
-# ifdef HAVE__SECURE_GETENV
-# define secure_getenv __secure_getenv
-# else
-# error neither secure_getenv nor __secure_getenv are available
-# endif
-#endif
-]]>
- </programlisting>
- </example>
- </section>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Processes-Daemons">
- <title>Daemons</title>
- <para>
- Background processes providing system services
- (<emphasis>daemons</emphasis>) need to decouple themselves from
- the controlling terminal and the parent process environment:
- </para>
- <itemizedlist>
- <listitem>
- <para>Fork.</para>
- </listitem>
- <listitem>
- <para>
- In the child process, call <function>setsid</function>. The
- parent process can simply exit (using
- <function>_exit</function>, to avoid running clean-up
- actions twice).
- </para>
- </listitem>
- <listitem>
- <para>
- In the child process, fork again. Processing continues in
- the child process. Again, the parent process should just
- exit.
- </para>
- </listitem>
- <listitem>
- <para>
- Replace the descriptors 0, 1, 2 with a descriptor for
- <filename>/dev/null</filename>. Logging should be
- redirected to <application>syslog</application>.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- Older instructions for creating daemon processes recommended a
- call to <literal>umask(0)</literal>. This is risky because it
- often leads to world-writable files and directories, resulting
- in security vulnerabilities such as arbitrary process
- termination by untrusted local users, or log file truncation.
- If the <emphasis>umask</emphasis> needs setting, a restrictive
- value such as <literal>027</literal> or
<literal>077</literal>
- is recommended.
- </para>
- <para>
- Other aspects of the process environment may have to changed as
- well (environment variables, signal handler disposition).
- </para>
- <para>
- It is increasingly common that server processes do not run as
- background processes, but as regular foreground process under a
- supervising master process (such as
- <application>systemd</application>). Server processes should
- offer a command line option which disables forking and
- replacement of the standard output and standard error streams.
- Such an option is also useful for debugging.
- </para>
- </section>
-
- <section>
- <title>Semantics of command line arguments</title>
- <!-- ??? This applies in two ways, safely calling an other process
- and support for being called safely. Also need to address
- untrusted current directory on USB sticks. -->
- <para>
- After process creation and option processing, it is up to the
- child process to interpret the arguments. Arguments can be
- file names, host names, or URLs, and many other things. URLs
- can refer to the local network, some server on the Internet,
- or to the local file system. Some applications even accept
- arbitrary code in arguments (for example,
- <application>python</application> with the
- <option>-c</option> option).
- </para>
- <para>
- Similar concerns apply to environment variables, the contents
- of the current directory and its subdirectories.
- <!-- ??? refer to section on temporary directories -->
- </para>
- <para>
- Consequently, careful analysis is required if it is safe to
- pass untrusted data to another program.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Processes-Fork-Parallel">
- <title><function>fork</function> as a primitive for
parallelism</title>
- <para>
- A call to <function>fork</function> which is not immediately
- followed by a call to <function>execve</function> (perhaps after
- rearranging and closing file descriptors) is typically unsafe,
- especially from a library which does not control the state of
- the entire process. Such use of <function>fork</function>
- should be replaced with proper child processes or threads.
- </para>
- </section>
-
-</chapter>
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/Serialization.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/Serialization.xml.svn-base
deleted file mode 100644
index 60427c5..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/Serialization.xml.svn-base
+++ /dev/null
@@ -1,397 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-Tasks-Serialization">
- <title>Serialization and Deserialization</title>
- <para>
- Protocol decoders and file format parsers are often the
- most-exposed part of an application because they are exposed with
- little or no user interaction and before any authentication and
- security checks are made. They are also difficult to write
- robustly in languages which are not memory-safe.
- </para>
-
- <section id="sect-Defensive_Coding-Tasks-Serialization-Decoders">
- <title>Recommendations for manually written decoders</title>
- <para>
- For C and C++, the advice in <xref
- linkend="sect-Defensive_Coding-C-Pointers"/> applies. In
- addition, avoid non-character pointers directly into input
- buffers. Pointer misalignment causes crashes on some
- architectures.
- </para>
- <para>
- When reading variable-sized objects, do not allocate large
- amounts of data solely based on the value of a size field. If
- possible, grow the data structure as more data is read from the
- source, and stop when no data is available. This helps to avoid
- denial-of-service attacks where little amounts of input data
- results in enormous memory allocations during decoding.
- Alternatively, you can impose reasonable bounds on memory
- allocations, but some protocols do not permit this.
- </para>
- </section>
-
- <section>
- <title>Protocol design</title>
- <para>
- Binary formats with explicit length fields are more difficult to
- parse robustly than those where the length of dynamically-sized
- elements is derived from sentinel values. A protocol which does
- not use length fields and can be written in printable ASCII
- characters simplifies testing and debugging. However, binary
- protocols with length fields may be more efficient to parse.
- </para>
- </section>
-
- <section>
- <title
id="sect-Defensive_Coding-Tasks-Serialization-Library">Library
- support for deserialization</title>
- <para>
- For some languages, generic libraries are available which allow
- to serialize and deserialize user-defined objects. The
- deserialization part comes in one of two flavors, depending on
- the library. The first kind uses type information in the data
- stream to control which objects are instantiated. The second
- kind uses type definitions supplied by the programmer. The
- first one allows arbitrary object instantiation, the second one
- generally does not.
- </para>
- <para>
- The following serialization frameworks are in the first category,
- are known to be unsafe, and must not be used for untrusted data:
- </para>
- <itemizedlist>
- <listitem><para>
- Python's <package>pickle</package> and
<package>cPickle</package>
- modules
- </para></listitem>
- <listitem><para>
- Perl's <package>Storable</package> package
- </para></listitem>
- <listitem><para>
- Java serialization (<type>java.io.ObjectInputStream</type>)
- </para></listitem>
- <listitem><para>
- PHP serialization (<function>unserialize</function>)
- </para></listitem>
- <listitem><para>
- Most implementations of YAML
- </para></listitem>
- </itemizedlist>
- <para>
- When using a type-directed deserialization format where the
- types of the deserialized objects are specified by the
- programmer, make sure that the objects which can be instantiated
- cannot perform any destructive actions in their destructors,
- even when the data members have been manipulated.
- </para>
- <para>
- JSON decoders do not suffer from this problem. But you must not
- use the <function>eval</function> function to parse JSON objects
- in Javascript; even with the regular expression filter from RFC
- 4627, there are still information leaks remaining.
- </para>
- </section>
-
- <section id="sect-Defensive_Coding-Tasks-Serialization-XML">
- <title>XML serialization</title>
- <para>
- </para>
- <section
id="sect-Defensive_Coding-Tasks-Serialization-XML-External">
- <title>External references</title>
- <para>
- XML documents can contain external references. They can occur
- in various places.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- In the DTD declaration in the header of an XML document:
- </para>
- <informalexample>
- <programlisting language="XML">
-<![CDATA[<!DOCTYPE html PUBLIC
- "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
- </programlisting>
- </informalexample>
- </listitem>
- <listitem>
- <para>
- In a namespace declaration:
- </para>
- <informalexample>
- <programlisting language="XML">
-<![CDATA[<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema">]]>
- </programlisting>
- </informalexample>
- </listitem>
- <listitem>
- <para>
- In an entity defintion:
- </para>
- <informalexample>
- <programlisting language="XML">
-<![CDATA[<!ENTITY sys SYSTEM "http://www.example.com/ent.xml">
-<!ENTITY pub PUBLIC "-//Example//Public Entity//EN"
- "http://www.example.com/pub-ent.xml">]]>
- </programlisting>
- </informalexample>
- </listitem>
- <listitem>
- <para>
- In a notation:
- </para>
- <informalexample>
- <programlisting language="XML">
-<![CDATA[<!NOTATION not SYSTEM "../not.xml">]]>
- </programlisting>
- </informalexample>
- </listitem>
- </itemizedlist>
- <para>
- Originally, these external references were intended as unique
- identifiers, but by many XML implementations, they are used
- for locating the data for the referenced element. This causes
- unwanted network traffic, and may disclose file system
- contents or otherwise unreachable network resources, so this
- functionality should be disabled.
- </para>
- <para>
- Depending on the XML library, external referenced might be
- processed not just when parsing XML, but also when generating
- it.
- </para>
- </section>
- <section
id="sect-Defensive_Coding-Tasks-Serialization-XML-Entities">
- <title>Entity expansion</title>
- <para>
- When external DTD processing is disabled, an internal DTD
- subset can still contain entity definitions. Entity
- declarations can reference other entities. Some XML libraries
- expand entities automatically, and this processing cannot be
- switched off in some places (such as attribute values or
- content models). Without limits on the entity nesting level,
- this expansion results in data which can grow exponentially in
- length with size of the input. (If there is a limit on the
- nesting level, the growth is still polynomial, unless further
- limits are imposed.)
- </para>
- <para>
- Consequently, the processing internal DTD subsets should be
- disabled if possible, and only trusted DTDs should be
- processed. If a particular XML application does not permit
- such restrictions, then application-specific limits are called
- for.
- </para>
- </section>
-
- <section
id="sect-Defensive_Coding-Tasks-Serialization-XML-XInclude">
- <title>XInclude processing</title>
- <para>
- XInclude processing can reference file and network resources
- and include them into the document, much like external entity
- references. When parsing untrusted XML documents, XInclude
- processing should be truned off.
- </para>
- <para>
- XInclude processing is also fairly complex and may pull in
- support for the XPointer and XPath specifications,
- considerably increasing the amount of code required for XML
- processing.
- </para>
- </section>
-
- <section
id="sect-Defensive_Coding-Tasks-Serialization-XML-Validation">
- <title>Algorithmic complexity of XML validation</title>
- <para>
- DTD-based XML validation uses regular expressions for content
- models. The XML specification requires that content models
- are deterministic, which means that efficient validation is
- possible. However, some implementations do not enforce
- determinism, and require exponential (or just polynomial)
- amount of space or time for validating some DTD/document
- combinations.
- </para>
- <para>
- XML schemas and RELAX NG (via the <literal>xsd:</literal>
- prefix) directly support textual regular expressions which are
- not required to be deterministic.
- </para>
- </section>
- <section id="sect-Defensive_Coding-Tasks-Serialization-XML-Expat">
- <title>Using Expat for XML parsing</title>
- <para>
- By default, Expat does not try to resolve external IDs, so no
- steps are required to block them. However, internal entity
- declarations are processed. Installing a callback which stops
- parsing as soon as such entities are encountered disables
- them, see <xref
- linkend="ex-Defensive_Coding-Tasks-Serialization-XML-Expat-EntityDeclHandler"/>.
- Expat does not perform any validation, so there are no
- problems related to that.
- </para>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-Expat-EntityDeclHandler">
- <title>Disabling XML entity processing with Expat</title>
- <xi:include href="snippets/Serialization-XML-Expat-EntityDeclHandler.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- This handler must be installed when the
- <literal>XML_Parser</literal> object is created (<xref
- linkend="ex-Defensive_Coding-Tasks-Serialization-XML-Expat-Create"/>).
- </para>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-Expat-Create">
- <title>Creating an Expat XML parser</title>
- <xi:include href="snippets/Serialization-XML-Expat-Create.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- It is also possible to reject internal DTD subsets altogeher,
- using a suitable
- <literal>XML_StartDoctypeDeclHandler</literal> handler
- installed with <function>XML_SetDoctypeDeclHandler</function>.
- </para>
- </section>
-
- <section
id="sect-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse">
- <title>Using OpenJDK for XML parsing and validation</title>
- <para>
- OpenJDK contains facilities for DOM-based, SAX-based, and
- StAX-based document parsing. Documents can be validated
- against DTDs or XML schemas.
- </para>
- <para>
- The approach taken to deal with entity expansion differs from
- the general recommendation in <xref
- linkend="sect-Defensive_Coding-Tasks-Serialization-XML-Entities"/>.
- We enable the the feature flag
- <literal>javax.xml.XMLConstants.FEATURE_SECURE_PROCESSING</literal>,
- which enforces heuristic restrictions on the number of entity
- expansions. Note that this flag alone does not prevent
- resolution of external references (system IDs or public IDs),
- so it is slightly misnamed.
- </para>
- <para>
- In the following sections, we use helper classes to prevent
- external ID resolution.
- </para>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK-NoEntityResolver">
- <title>Helper class to prevent DTD external entity resolution in
OpenJDK</title>
- <xi:include href="snippets/Serialization-XML-OpenJDK-NoEntityResolver.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK-NoResourceResolver">
- <title>Helper class to prevent schema resolution in
- OpenJDK</title>
- <xi:include
href="snippets/Serialization-XML-OpenJDK-NoResourceResolver.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- <xref
linkend="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK-Imports"/>
- shows the imports used by the examples.
- </para>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK-Imports">
- <title>Java imports for OpenJDK XML parsing</title>
- <xi:include href="snippets/Serialization-XML-OpenJDK-Imports.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <section
id="sect-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-DOM">
- <title>DOM-based XML parsing and DTD validation in OpenJDK</title>
- <para>
- This approach produces a
- <literal>org.w3c.dom.Document</literal> object from an input
- stream. <xref
linkend="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-DOM"/>
- use the data from the <literal>java.io.InputStream</literal>
- instance in the <literal>inputStream</literal> variable.
- </para>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-DOM">
- <title>DOM-based XML parsing in OpenJDK</title>
- <xi:include href="snippets/Serialization-XML-OpenJDK_Parse-DOM.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- External entity references are prohibited using the
- <literal>NoEntityResolver</literal> class in
- <xref
linkend="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK-NoEntityResolver"/>.
- Because external DTD references are prohibited, DTD validation
- (if enabled) will only happen against the internal DTD subset
- embedded in the XML document.
- </para>
- <para>
- To validate the document against an external DTD, use a
- <literal>javax.xml.transform.Transformer</literal> class to
- add the DTD reference to the document, and an entity
- resolver which whitelists this external reference.
- </para>
- </section>
-
- <section
id="sect-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-SAX">
- <title>XML Schema validation in OpenJDK</title>
- <para>
- <xref
linkend="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-XMLSchema_SAX"/>
- shows how to validate a document against an XML Schema,
- using a SAX-based approach. The XML data is read from an
- <literal>java.io.InputStream</literal> in the
- <literal>inputStream</literal> variable.
- </para>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-XMLSchema_SAX">
- <title>SAX-based validation against an XML schema in
- OpenJDK</title>
- <xi:include
href="snippets/Serialization-XML-OpenJDK_Parse-XMLSchema_SAX.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- <para>
- The <literal>NoResourceResolver</literal> class is defined
- in <xref
linkend="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK-NoResourceResolver"/>.
- </para>
- <para>
- If you need to validate a document against an XML schema,
- use the code in <xref
-
linkend="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-DOM"/>
- to create the document, but do not enable validation at this
- point. Then use
- <xref
linkend="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-XMLSchema_DOM"/>
- to perform the schema-based validation on the
- <literal>org.w3c.dom.Document</literal> instance
- <literal>document</literal>.
- </para>
- <example
id="ex-Defensive_Coding-Tasks-Serialization-XML-OpenJDK_Parse-XMLSchema_DOM">
- <title>Validation of a DOM document against an XML schema in
- OpenJDK</title>
- <xi:include
href="snippets/Serialization-XML-OpenJDK_Parse-XMLSchema_DOM.xml"
-
xmlns:xi="http://www.w3.org/2001/XInclude" />
- </example>
- </section>
- </section>
- </section>
-
- <section>
- <title>Protocol Encoders</title>
- <para>
- For protocol encoders, you should write bytes to a buffer which
- grows as needed, using an exponential sizing policy. Explicit
- lengths can be patched in later, once they are known.
- Allocating the required number of bytes upfront typically
- requires separate code to compute the final size, which must be
- kept in sync with the actual encoding step, or vulnerabilities
- may result. In multi-threaded code, parts of the object being
- deserialized might change, so that the computed size is out of
- date.
- </para>
- <para>
- You should avoid copying data directly from a received packet
- during encoding, disregarding the format. Propagating malformed
- data could enable attacks on other recipients of that data.
- </para>
- <para>
- When using C or C++ and copying whole data structures directly
- into the output, make sure that you do not leak information in
- padding bytes between fields or at the end of the
- <literal>struct</literal>.
- </para>
- </section>
-
-</chapter>
-
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/Temporary_Files.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/Temporary_Files.xml.svn-base
deleted file mode 100644
index d78bad7..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/Temporary_Files.xml.svn-base
+++ /dev/null
@@ -1,257 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<chapter id="chap-Defensive_Coding-Tasks-Temporary_Files">
- <title>Temporary files</title>
- <para>
- In this chapter, we describe how to create temporary files and
- directories, how to remove them, and how to work with programs
- which do not create files in ways that a safe with a shared
- directory for temporary files. General file system manipulation
- is treated in a separate chapter, <xref
- linkend="chap-Defensive_Coding-Tasks-File_System"/>.
- </para>
- <para>
- Secure creation of temporary files has four different aspects.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The location of the directory for temporary files must be
- obtained in a secure manner (that is, untrusted environment
- variables must be ignored, see <xref
- linkend="sect-Defensive_Coding-Tasks-secure_getenv"/>).
- </para>
- </listitem>
- <listitem>
- <para>
- A new file must be created. Reusing an existing file must be
- avoided (the <filename class="directory">/tmp</filename> race
- condition). This is tricky because traditionally, system-wide
- temporary directories shared by all users are used.
- </para>
- </listitem>
- <listitem>
- <para>
- The file must be created in a way that makes it impossible for
- other users to open it.
- </para>
- </listitem>
- <listitem>
- <para>
- The descriptor for the temporary file should not leak to
- subprocesses.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- All functions mentioned below will take care of these aspects.
- </para>
- <para>
- Traditionally, temporary files are often used to reduce memory
- usage of programs. More and more systems use RAM-based file
- systems such as <literal>tmpfs</literal> for storing temporary
- files, to increase performance and decrease wear on Flash storage.
- As a result, spooling data to temporary files does not result in
- any memory savings, and the related complexity can be avoided if
- the data is kept in process memory.
- </para>
-
- <section id="chap-Defensive_Coding-Tasks-Temporary_Files-Location">
- <title>Obtaining the location of temporary directory</title>
- <para>
- Some functions below need the location of a directory which
- stores temporary files. For C/C++ programs, use the following
- steps to obtain that directory:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Use <function>secure_getenv</function> to obtain the value
- of the <literal>TMPDIR</literal> environment variable. If
- it is set, convert the path to a fully-resolved absolute
- path, using <literal>realpath(path, NULL)</literal>. Check
- if the new path refers to a directory and is writeable. In
- this case, use it as the temporary directory.
- </para>
- </listitem>
- <listitem>
- <para>
- Fall back to <filename class="directory">/tmp</filename>.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- In Python, you can use the <varname>tempfile.tempdir</varname>
- variable.
- </para>
- <para>
- Java does not support SUID/SGID programs, so you can use the
- <function>java.lang.System.getenv(String)</function> method to
- obtain the value of the <literal>TMPDIR</literal> environment
- variable, and follow the two steps described above. (Java's
- default directory selection does not honor
- <literal>TMPDIR</literal>.)
- </para>
- </section>
-
- <section>
- <title>Named temporary files</title>
- <para>
- The <function>mkostemp</function> function creates a named
- temporary file. You should specify the
- <literal>O_CLOEXEC</literal> flag to avoid file descriptor leaks
- to subprocesses. (Applications which do not use multiple threads
- can also use <function>mkstemp</function>, but libraries should
- use <function>mkostemp</function>.) For determining the
- directory part of the file name pattern, see <xref
- linkend="chap-Defensive_Coding-Tasks-Temporary_Files-Location"/>.
- </para>
- <para>
- The file is not removed automatically. It is not safe to rename
- or delete the file before processing, or transform the name in
- any way (for example, by adding a file extension). If you need
- multiple temporary files, call <function>mkostemp</function>
- multiple times. Do not create additional file names derived
- from the name provided by a previous
- <function>mkostemp</function> call. However, it is safe to close
- the descriptor returned by <function>mkostemp</function> and
- reopen the file using the generated name.
- </para>
- <para>
- The Python class <literal>tempfile.NamedTemporaryFile</literal>
- provides similar functionality, except that the file is deleted
- automatically by default. Note that you may have to use the
- <literal>file</literal> attribute to obtain the actual file
- object because some programming interfaces cannot deal with
- file-like objects. The C function <function>mkostemp</function>
- is also available as <function>tempfile.mkstemp</function>.
- </para>
- <para>
- In Java, you can use the
- <function>java.io.File.createTempFile(String, String,
- File)</function> function, using the temporary file location
- determined according to <xref
- linkend="chap-Defensive_Coding-Tasks-Temporary_Files-Location"/>.
- Do not use <function>java.io.File.deleteOnExit()</function> to
- delete temporary files, and do not register a shutdown hook for
- each temporary file you create. In both cases, the deletion
- hint cannot be removed from the system if you delete the
- temporary file prior to termination of the VM, causing a memory
- leak.
- </para>
- </section>
-
- <section>
- <title>Temporary files without names</title>
- <para>
- The <function>tmpfile</function> function creates a temporary
- file and immediately deletes it, while keeping the file open.
- As a result, the file lacks a name and its space is deallocated
- as soon as the file descriptor is closed (including the implicit
- close when the process terminates). This avoids cluttering the
- temporary directory with orphaned files.
- </para>
- <para>
- Alternatively, if the maximum size of the temporary file is
- known beforehand, the <function>fmemopen</function> function can
- be used to create a <literal>FILE *</literal> object which is
- backed by memory.
- </para>
- <para>
- In Python, unnamed temporary files are provided by the
- <literal>tempfile.TemporaryFile</literal> class, and the
- <literal>tempfile.SpooledTemporaryFile</literal> class provides
- a way to avoid creation of small temporary files.
- </para>
- <para>
- Java does not support unnamed temporary files.
- </para>
- </section>
-
- <section id="chap-Defensive_Coding-Tasks-Temporary_Directory">
- <title>Temporary directories</title>
- <para>
- The <function>mkdtemp</function> function can be used to create
- a temporary directory. (For determining the directory part of
- the file name pattern, see <xref
- linkend="chap-Defensive_Coding-Tasks-Temporary_Files-Location"/>.)
- The directory is not automatically removed. In Python, this
- function is available as <function>tempfile.mkdtemp</function>.
- In Java 7, temporary directories can be created using the
- <function>java.nio.file.Files.createTempDirectory(Path, String,
- FileAttribute...)</function> function.
- </para>
- <para>
- When creating files in the temporary directory, use
- automatically generated names, e.g., derived from a sequential
- counter. Files with externally provided names could be picked
- up in unexpected contexts, and crafted names could actually
- point outside of the tempoary directory (due to
- <emphasis>directory traversal</emphasis>).
- </para>
- <para>
- Removing a directory tree in a completely safe manner is
- complicated. Unless there are overriding performance concerns,
- the <application>rm</application> program should be used, with
- the <option>-rf</option> and <option>--</option> options.
- </para>
- </section>
-
- <section>
- <title>Compensating for unsafe file creation</title>
- <para>
- There are two ways to make a function or program which excepts a
- file name safe for use with temporary files. See
- <xref linkend="sect-Defensive_Coding-Tasks-Processes-Creation"/>,
- for details on subprocess creation.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Create a temporary directory and place the file there. If
- possible, run the program in a subprocess which uses the
- temporary directory as its current directory, with a
- restricted environment.
- Use generated names for all files in that temporary
- directory. (See <xref
- linkend="chap-Defensive_Coding-Tasks-Temporary_Directory"/>.)
- </para>
- </listitem>
- <listitem>
- <para>
- Create the temporary file and pass the generated file name
- to the function or program. This only works if the function
- or program can cope with a zero-length existing file. It is
- safe only under additional assumptions:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- The function or program must not create additional files
- whose name is derived from the specified file name or
- are otherwise predictable.
- </para>
- </listitem>
- <listitem>
- <para>
- The function or program must not delete the file before
- processing it.
- </para>
- </listitem>
- <listitem>
- <para>
- It must not access any existing files in the same
- directory.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- It is often difficult to check whether these additional
- assumptions are matched, therefore this approach is not
- recommended.
- </para>
- </listitem>
- </itemizedlist>
- </section>
-</chapter>
diff --git a/defensive-coding/en-US/Tasks/.svn/text-base/schemas.xml.svn-base
b/defensive-coding/en-US/Tasks/.svn/text-base/schemas.xml.svn-base
deleted file mode 100644
index 8e84245..0000000
--- a/defensive-coding/en-US/Tasks/.svn/text-base/schemas.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<locatingRules
xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
- <include rules="../../schemas.xml"/>
-</locatingRules>
diff --git a/defensive-coding/scripts/.svn/all-wcprops
b/defensive-coding/scripts/.svn/all-wcprops
deleted file mode 100644
index a74e619..0000000
--- a/defensive-coding/scripts/.svn/all-wcprops
+++ /dev/null
@@ -1,11 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 67
-/repos/product-security/!svn/ver/288/defensive-coding/trunk/scripts
-END
-split-snippets.py
-K 25
-svn:wc:ra_dav:version-url
-V 85
-/repos/product-security/!svn/ver/288/defensive-coding/trunk/scripts/split-snippets.py
-END
diff --git a/defensive-coding/scripts/.svn/entries
b/defensive-coding/scripts/.svn/entries
deleted file mode 100644
index 9c80cd2..0000000
--- a/defensive-coding/scripts/.svn/entries
+++ /dev/null
@@ -1,62 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/scripts
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2012-12-14T09:21:42.199416Z
-288
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-split-snippets.py
-file
-
-
-
-
-2013-01-10T17:17:49.053814Z
-a3a947246ad0000e1e2f3836674da5ce
-2012-12-14T09:21:42.199416Z
-288
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3637
-
diff --git a/defensive-coding/scripts/.svn/text-base/split-snippets.py.svn-base
b/defensive-coding/scripts/.svn/text-base/split-snippets.py.svn-base
deleted file mode 100644
index 411fbd3..0000000
--- a/defensive-coding/scripts/.svn/text-base/split-snippets.py.svn-base
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/python
-
-# Split source code files into XML snippets for inclusion in the
-# documentation.
-#
-# Usage: python split-snippets.py TARGET-ROOT INPUT-FILE...
-#
-# Directives in the input files have the form:
-#
-# //+ Directory File-Base-Name
-# lines to be included in
-# the file
-# //-
-#
-# In this example, the lines are written to the file
-# en-US/Directory/snippets/File-Base-Name.xml under the TARGET-ROOT
-# directory. Whitespace shared with the starting line is stripped.
-# Instead of "//", it is possible to use "#".
-
-import re
-import sys
-
-target_root = sys.argv[1]
-
-def output_file_name(dirname, basename):
- return "{0}/en-US/{1}/snippets/{2}.xml".format(
- target_root, dirname, basename)
-
-re_open_file = re.compile(
- r'^(\s*)(?://|#)\+\s+([a-zA-Z0-9_-]+)\s+([a-zA-Z0-9_-]+)\s*\n?$')
-re_close_file = re.compile(r'^\s*(?://|#)\-\s*\n?$')
-
-def extension_to_language(path, map={
- 'c' : 'C',
- 'py' : 'Python',
- 'java' : 'Java',
- }):
- return map.get(path.split('.')[-1], 'C')
-
-def write_single_file(path, contents, language):
- assert not [ch for ch in language if ch in "<>&\""]
- with file(path, "w") as out:
- out.write('''<?xml version='1.0' encoding='utf-8'
?>
-<!DOCTYPE programlisting PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-]>
-<!-- Automatically generated file. Do not edit. -->
-<programlisting language="''' + language + '''">
-''')
- for line in contents:
- for ch in line:
- if ch in "<>&":
- out.write("&#{0};".format(ord(ch)))
- else:
- out.write(ch)
- out.write("</programlisting>\n")
-
-def write_output(output):
- for (outpath, (origpath, contents)) in output.items():
- write_single_file(outpath, contents,
- extension_to_language(origpath))
-
-def process_file(path):
- output = {}
- with file(path) as f:
- current_file = None
- current_contents = None
- indent = None
- for line in f.readlines():
- match = re_open_file.match(line)
- if match is not None:
- if current_file is None:
- current_file = output_file_name(
- match.group(2), match.group(3))
- if current_file in output:
- raise IOError("{0} written by {1} and {2}",
- current_file, output[current_file][0],
- path)
- indent = match.group(1)
- current_contents = []
- output[current_file] = (path, current_contents)
- else:
- raise IOError("{0}: unterminated export to {1}".format(
- path, current_file))
- continue
-
- match = re_close_file.match(line)
- if match is not None:
- if current_file is None:
- raise IOError("{0}: closing file which is not open")
- else:
- current_file = None
- current_contents = None
- indent = None
- continue
-
- if current_file is not None:
- if line.startswith(indent):
- line = line[len(indent):]
- current_contents.append(line)
- if current_file is not None:
- raise IOError("{0}: unterminated export to {1}".format(
- path, current_file))
- write_output(output)
-
-for path in sys.argv[2:]:
- process_file(path)
diff --git a/defensive-coding/src/.svn/all-wcprops
b/defensive-coding/src/.svn/all-wcprops
deleted file mode 100644
index fec8a06..0000000
--- a/defensive-coding/src/.svn/all-wcprops
+++ /dev/null
@@ -1,107 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 63
-/repos/product-security/!svn/ver/302/defensive-coding/trunk/src
-END
-tcp_connect.c
-K 25
-svn:wc:ra_dav:version-url
-V 77
-/repos/product-security/!svn/ver/230/defensive-coding/trunk/src/tcp_connect.c
-END
-TLS-Client-OpenSSL.c
-K 25
-svn:wc:ra_dav:version-url
-V 84
-/repos/product-security/!svn/ver/276/defensive-coding/trunk/src/TLS-Client-OpenSSL.c
-END
-C-Arithmetic-add.c
-K 25
-svn:wc:ra_dav:version-url
-V 82
-/repos/product-security/!svn/ver/203/defensive-coding/trunk/src/C-Arithmetic-add.c
-END
-x509_check_host.c
-K 25
-svn:wc:ra_dav:version-url
-V 81
-/repos/product-security/!svn/ver/235/defensive-coding/trunk/src/x509_check_host.c
-END
-TLS-Client-Python.py
-K 25
-svn:wc:ra_dav:version-url
-V 84
-/repos/product-security/!svn/ver/269/defensive-coding/trunk/src/TLS-Client-Python.py
-END
-tcp_connect.h
-K 25
-svn:wc:ra_dav:version-url
-V 77
-/repos/product-security/!svn/ver/230/defensive-coding/trunk/src/tcp_connect.h
-END
-check-function.py
-K 25
-svn:wc:ra_dav:version-url
-V 81
-/repos/product-security/!svn/ver/235/defensive-coding/trunk/src/check-function.py
-END
-XML-Parser-Expat.c
-K 25
-svn:wc:ra_dav:version-url
-V 82
-/repos/product-security/!svn/ver/277/defensive-coding/trunk/src/XML-Parser-Expat.c
-END
-TLSClientOpenJDK.java
-K 25
-svn:wc:ra_dav:version-url
-V 85
-/repos/product-security/!svn/ver/302/defensive-coding/trunk/src/TLSClientOpenJDK.java
-END
-src.mk
-K 25
-svn:wc:ra_dav:version-url
-V 70
-/repos/product-security/!svn/ver/277/defensive-coding/trunk/src/src.mk
-END
-TLS-Client-NSS.c
-K 25
-svn:wc:ra_dav:version-url
-V 80
-/repos/product-security/!svn/ver/259/defensive-coding/trunk/src/TLS-Client-NSS.c
-END
-DERParser.java
-K 25
-svn:wc:ra_dav:version-url
-V 78
-/repos/product-security/!svn/ver/298/defensive-coding/trunk/src/DERParser.java
-END
-XMLParserOpenJDK.java
-K 25
-svn:wc:ra_dav:version-url
-V 85
-/repos/product-security/!svn/ver/287/defensive-coding/trunk/src/XMLParserOpenJDK.java
-END
-TLS-Client-GNUTLS.c
-K 25
-svn:wc:ra_dav:version-url
-V 83
-/repos/product-security/!svn/ver/264/defensive-coding/trunk/src/TLS-Client-GNUTLS.c
-END
-C-Arithmetic-mult.c
-K 25
-svn:wc:ra_dav:version-url
-V 83
-/repos/product-security/!svn/ver/203/defensive-coding/trunk/src/C-Arithmetic-mult.c
-END
-C-Pointers-remaining.c
-K 25
-svn:wc:ra_dav:version-url
-V 86
-/repos/product-security/!svn/ver/199/defensive-coding/trunk/src/C-Pointers-remaining.c
-END
-C-String-Functions.c
-K 25
-svn:wc:ra_dav:version-url
-V 84
-/repos/product-security/!svn/ver/266/defensive-coding/trunk/src/C-String-Functions.c
-END
diff --git a/defensive-coding/src/.svn/dir-prop-base
b/defensive-coding/src/.svn/dir-prop-base
deleted file mode 100644
index 9582a52..0000000
--- a/defensive-coding/src/.svn/dir-prop-base
+++ /dev/null
@@ -1,11 +0,0 @@
-K 10
-svn:ignore
-V 96
-TLS-Client-GNUTLS
-TLS-Client-NSS
-TLS-Client-OpenSSL
-*.class
-XML-Parser-Expat
-C-String-Functions
-
-END
diff --git a/defensive-coding/src/.svn/entries b/defensive-coding/src/.svn/entries
deleted file mode 100644
index e31ad85..0000000
--- a/defensive-coding/src/.svn/entries
+++ /dev/null
@@ -1,609 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/src
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2013-01-16T14:32:22.318444Z
-302
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-x509_check_host.c
-file
-
-
-
-
-2013-01-10T17:17:51.274827Z
-cf59145b923348078c5b629bbc36a612
-2012-11-15T13:30:09.956181Z
-235
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-10523
-
-C-Arithmetic-add.c
-file
-
-
-
-
-2013-01-10T17:17:51.273827Z
-ba6ae49b4b718e5adfa2a8d1f9cf3447
-2012-11-08T17:22:27.237361Z
-203
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-273
-
-TLS-Client-OpenSSL.c
-file
-
-
-
-
-2013-01-10T17:17:51.273827Z
-8225e11e3ec21df2a67e39b36565a1c9
-2012-12-11T10:28:32.959649Z
-276
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9290
-
-tcp_connect.c
-file
-
-
-
-
-2013-01-10T17:17:51.273827Z
-b2d13024e62b0e1ba54bbd7daf9ae36d
-2012-11-14T11:42:15.218138Z
-230
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1260
-
-TLS-Client-Python.py
-file
-
-
-
-
-2013-01-10T17:17:51.274827Z
-20864f5c6dd1badf9eeb2f5942296628
-2012-12-06T16:39:47.679456Z
-269
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1785
-
-tcp_connect.h
-file
-
-
-
-
-2013-01-10T17:17:51.274827Z
-12a090a3cf7b1a3bc3328907aac1c9a1
-2012-11-14T11:42:15.218138Z
-230
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-212
-
-check-function.py
-file
-
-
-
-
-2013-01-10T17:17:51.274827Z
-c2c9d4e9c7d1c9f6e47546cf282447ba
-2012-11-15T13:30:09.956181Z
-235
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-502
-
-XML-Parser-Expat.c
-file
-
-
-
-
-2013-01-10T17:17:51.274827Z
-49a0ea5daaf9083655ad0aff29b6b75c
-2012-12-11T13:38:24.215899Z
-277
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3193
-
-TLSClientOpenJDK.java
-file
-
-
-
-
-2013-01-16T22:05:55.401436Z
-4abb6802c85413ee92c77e48cbb9b286
-2013-01-16T14:32:22.318444Z
-302
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9265
-
-src.mk
-file
-
-
-
-
-2013-01-10T17:17:51.274827Z
-4906704e783cba97d0a39690cf24d67a
-2012-12-11T13:38:24.215899Z
-277
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1783
-
-TLS-Client-NSS.c
-file
-
-
-
-
-2013-01-10T17:17:51.274827Z
-61e2a46efaa13617ee79c1959caf9e57
-2012-11-22T09:09:14.707205Z
-259
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-8741
-
-DERParser.java
-file
-
-
-
-
-2013-01-10T17:17:51.275827Z
-31258b320a9b296256618b29be2770e4
-2012-12-20T14:35:12.581576Z
-298
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-8895
-
-XMLParserOpenJDK.java
-file
-
-
-
-
-2013-01-10T17:17:51.275827Z
-bdaea7ab5c87509aa6fe9ecd7e9b8ee9
-2012-12-14T09:12:55.055726Z
-287
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-11200
-
-TLS-Client-GNUTLS.c
-file
-
-
-
-
-2013-01-10T17:17:51.275827Z
-e6414ded83341422b06e84ac93cef929
-2012-11-27T10:01:21.025921Z
-264
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-8435
-
-data
-dir
-
-C-Arithmetic-mult.c
-file
-
-
-
-
-2013-01-10T17:17:51.276827Z
-f38568ac032b21c11f048af0b7ddbad5
-2012-11-08T17:22:27.237361Z
-203
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-176
-
-C-Pointers-remaining.c
-file
-
-
-
-
-2013-01-10T17:17:51.276827Z
-ccd36adf2f3ecdeec33c83fa3a232156
-2012-11-08T16:59:17.247803Z
-199
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-896
-
-C-String-Functions.c
-file
-
-
-
-
-2013-01-10T17:17:51.276827Z
-1b5f94f6d6c566d3d9ff3a4c76680636
-2012-11-27T11:25:03.476147Z
-266
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-961
-
diff --git a/defensive-coding/src/.svn/text-base/C-Arithmetic-add.c.svn-base
b/defensive-coding/src/.svn/text-base/C-Arithmetic-add.c.svn-base
deleted file mode 100644
index 3e70286..0000000
--- a/defensive-coding/src/.svn/text-base/C-Arithmetic-add.c.svn-base
+++ /dev/null
@@ -1,17 +0,0 @@
-//+ C Arithmetic-add
-void report_overflow(void);
-
-int
-add(int a, int b)
-{
- int result = a + b;
- if (a < 0 || b < 0) {
- return -1;
- }
- // The compiler can optimize away the following if statement.
- if (result < 0) {
- report_overflow();
- }
- return result;
-}
-//-
diff --git a/defensive-coding/src/.svn/text-base/C-Arithmetic-mult.c.svn-base
b/defensive-coding/src/.svn/text-base/C-Arithmetic-mult.c.svn-base
deleted file mode 100644
index 82b7f40..0000000
--- a/defensive-coding/src/.svn/text-base/C-Arithmetic-mult.c.svn-base
+++ /dev/null
@@ -1,12 +0,0 @@
-void report_overflow(void);
-
-//+ C Arithmetic-mult
-unsigned
-mul(unsigned a, unsigned b)
-{
- if (b && a > ((unsigned)-1) / b) {
- report_overflow();
- }
- return a * b;
-}
-//-
diff --git a/defensive-coding/src/.svn/text-base/C-Pointers-remaining.c.svn-base
b/defensive-coding/src/.svn/text-base/C-Pointers-remaining.c.svn-base
deleted file mode 100644
index e9f7be7..0000000
--- a/defensive-coding/src/.svn/text-base/C-Pointers-remaining.c.svn-base
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-//+ C Pointers-remaining
-ssize_t
-extract_strings(const char *in, size_t inlen, char **out, size_t outlen)
-{
- const char *inp = in;
- const char *inend = in + inlen;
- char **outp = out;
- char **outend = out + outlen;
-
- while (inp != inend) {
- size_t len;
- char *s;
- if (outp == outend) {
- errno = ENOSPC;
- goto err;
- }
- len = (unsigned char)*inp;
- ++inp;
- if (len > (size_t)(inend - inp)) {
- errno = EINVAL;
- goto err;
- }
- s = malloc(len + 1);
- if (s == NULL) {
- goto err;
- }
- memcpy(s, inp, len);
- inp += len;
- s[len] = '\0';
- *outp = s;
- ++outp;
- }
- return outp - out;
-err:
- {
- int errno_old = errno;
- while (out != outp) {
- free(*out);
- ++out;
- }
- errno = errno_old;
- }
- return -1;
-}
-//-
diff --git a/defensive-coding/src/.svn/text-base/C-String-Functions.c.svn-base
b/defensive-coding/src/.svn/text-base/C-String-Functions.c.svn-base
deleted file mode 100644
index b2139ac..0000000
--- a/defensive-coding/src/.svn/text-base/C-String-Functions.c.svn-base
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-static void
-log_string(const char *s)
-{
- puts(s);
-}
-
-//+ C String-Functions-format
-void log_format(const char *format, ...) __attribute__((format(printf, 1, 2)));
-
-void
-log_format(const char *format, ...)
-{
- char buf[1000];
- va_list ap;
- va_start(ap, format);
- vsnprintf(buf, sizeof(buf), format, ap);
- va_end(ap);
- log_string(buf);
-}
-//-
-
-int
-main(void)
-{
- {
- int numerator = 3, denominator = 4;
- //+ C String-Functions-snprintf
- char fraction[30];
- snprintf(fraction, sizeof(fraction), "%d/%d", numerator, denominator);
- //-
- puts(fraction);
- }
- log_format("%s %x", "foo", 0xba4);
- {
- const char *const data = "this message is quite long";
- //+ C String-Functions-strncpy
- char buf[10];
- strncpy(buf, data, sizeof(buf));
- buf[sizeof(buf) - 1] = '\0';
- //-
- assert(strlen(buf) == 9);
- assert(strncmp(buf, data, 9) == 0);
- }
-}
diff --git a/defensive-coding/src/.svn/text-base/DERParser.java.svn-base
b/defensive-coding/src/.svn/text-base/DERParser.java.svn-base
deleted file mode 100644
index 67157db..0000000
--- a/defensive-coding/src/.svn/text-base/DERParser.java.svn-base
+++ /dev/null
@@ -1,274 +0,0 @@
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.nio.charset.Charset;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-
-/**
- * Minimalistic DER parser suitable for extracting the commonName attribute from
- * a subject distinguished name of an X.509 certificate.
- *
- * <p>
- * All elements in the DER structure can be parsed using:
- *
- * <pre>
- * while (parser.isRemaining()) {
- * if (!parser.next()) {
- * handleError();
- * break;
- * }
- * // Examine parser.getTagClass() etc. here.
- * }
- * </pre>
- * <p>
- * Note that this parser only handles structures of up to 16 MB in size.
- *
- * @author Florian Weimer <fweimer(a)redhat.com>
- *
- */
-public final class DERParser {
- private final byte[] data;
- private final int end;
- private int offset;
-
- private int tag = -1;
- private int contentLength = -1;
-
- // Content starts at offset - contentLength.
-
- /**
- * Creates a new parser for the specified array.
- *
- * @param data
- * the data to parse (not copied)
- * @throws NullPointerException
- * the argument is null
- */
- public DERParser(byte[] data) {
- this(data, 0, data.length);
- }
-
- /**
- * Creates an new parser for the slice [offset, offset + length) of the byte
- * array.
- *
- * @param data
- * the array to parse from (not copied)
- * @param offset
- * the offset at which to start parsing
- * @param length
- * the number of bytes to parse
- * @throws NullPointerException
- * the array argument is null
- * @throws ArrayIndexOutOfBoundsException
- * offset or length are negative or extend past the end of the
- * array
- */
- public DERParser(byte[] data, int offset, int length) {
- this.data = data;
- this.offset = offset;
- end = offset + length;
- if (offset < 0 || length < 0 || offset > data.length || end < 0
- || end > data.length)
- throw new ArrayIndexOutOfBoundsException();
- }
-
- /**
- * Returns true if more data can be extracted from the input.
- */
- public boolean isRemaining() {
- return offset < end;
- }
-
- /**
- * Decodes the next tag/length/value element in the input data. After that,
- * the parsed data can be examined using
- * {@link #getTag()}, {@link #getLength()}, {@link #getString()}, and
- * {@link #open()}.
- * @return true if the TLV could be parsed successfully, false otherwise
- */
- public boolean next() {
- if (offset >= end)
- throw new IllegalStateException("input exhausted");
- int identifier = data[offset];
- tag = identifier & ~0x20; // mask out P/C bit
- if ((tag & 0x1f) == 31)
- return false; // long form of type not supported
- ++offset;
- if (offset >= end)
- return false;
- contentLength = data[offset];
- if (contentLength < 0) {
- int subLength = contentLength & 0x7f;
- contentLength = 0;
- switch (subLength) {
- case 3:
- ++offset;
- if (offset >= end)
- return false;
- contentLength = (data[offset] & 0xFF) << 16;
- //$FALL-THROUGH$
- case 2:
- ++offset;
- if (offset >= end)
- return false;
- contentLength = contentLength | ((data[offset] & 0xFF) << 8);
- //$FALL-THROUGH$
- case 1:
- ++offset;
- if (offset >= end)
- return false;
- contentLength = contentLength | (data[offset] & 0xFF);
- break;
- case 0:
- default:
- // We only need to support DER values up to 16 MB.
- return false;
- }
- }
- ++offset;
- if (offset + contentLength < 0 || offset + contentLength > end)
- return false;
- offset += contentLength;
- return true;
- }
-
- public static final int TAG_OBJECT_IDENTIFIER = 6;
- public static final int TAG_UTF8_STRING = 12;
- public static final int TAG_SEQUENCE = 16;
- public static final int TAG_SET = 17;
- public static final int TAG_PRINTABLE_STRING = 19;
- public static final int TAG_TELETEX_STRING = 20;
- public static final int TAG_IA5_STRING = 22;
- public static final int TAG_UNIVERSAL_STRING = 28;
- public static final int TAG_BMP_STRING = 30;
-
- /**
- * Returns the tag value encountered by the most recent call to
- * {@link #next()}.
- * @return if the class is universal, an integer between 0 and 31,
- * otherwise a positive integer less than 255 (which includes
- * the class bits as well)
- */
- public int getTag() {
- return tag;
- }
-
- /**
- * Returns the length (in bytes) of the content encountered by the most
- * recent call to {@link #next()}.
- *
- * @return a non-negative integer
- */
- public int getLength() {
- return contentLength;
- }
-
- /**
- * Returns true if the current content bytes are equal to the specified
- * bytes.
- *
- * @param reference
- * the byte array to compare the current content to
- * @return true if length the byte content match
- */
- public boolean isContent(byte[] reference) {
- if (reference.length != contentLength)
- return false;
- int off = offset - contentLength;
- for (int i = 0; i < reference.length; ++i) {
- if (data[off + i] != reference[i])
- return false;
- }
- return true;
- }
-
- /**
- * Returns the current object as a string.
- *
- * @return a new string which contains the current content in decoded form
- * @throws IllegalStateException
- * the parser is not positioned at a string type
- */
- public String getString() {
- String charset;
- switch (tag) {
- case TAG_UTF8_STRING:
- charset = "UTF-8";
- break;
- case TAG_PRINTABLE_STRING:
- case TAG_TELETEX_STRING: // ASCII super-set not supported by Java
- case TAG_IA5_STRING:
- charset = "ASCII";
- break;
- case TAG_UNIVERSAL_STRING:
- charset = "UTF-32BE";
- break;
- case TAG_BMP_STRING:
- charset = "UTF-16BE";
- break;
- default:
- throw new IllegalStateException(
- "string requested for non-string type " + tag);
- }
- return new String(data, offset - contentLength, contentLength,
- Charset.forName(charset));
- }
-
- /**
- * Returns a DER parser for the current substructure
- *
- * @return a new DER parser object which shares the underlying byte array
- * with this one
- */
- public DERParser open() {
- return new DERParser(data, offset - contentLength, contentLength);
- }
-
- // Code below only included for exploratory purposes.
-
- private static final byte[] OID_COMMON_NAME = { 2 * 40 + 5, 4, 3 };
-
- public static String getHostname(X509Certificate peer) {
- DERParser outer = new DERParser(peer.getSubjectX500Principal()
- .getEncoded());
- if (!outer.next() || outer.getTag() != DERParser.TAG_SEQUENCE)
- return null;
- outer = outer.open();
- String mostSpecificCN = null;
- while (outer.isRemaining()) {
- if (!outer.next() || outer.getTag() != DERParser.TAG_SET)
- return null;
- DERParser inner = outer.open();
- if (!inner.next() || inner.getTag() != DERParser.TAG_SEQUENCE)
- continue;
- inner = inner.open();
- if (inner.next() && inner.getTag() == TAG_OBJECT_IDENTIFIER
- && inner.isContent(OID_COMMON_NAME)) {
- inner.next(); // read value
- try {
- mostSpecificCN = inner.getString();
- } catch (IllegalArgumentException e) {
- // Ignore unsupported string types.
- }
- }
- }
- return mostSpecificCN;
- }
-
- public static void main(String[] args) throws Exception {
- CertificateFactory factory = CertificateFactory.getInstance("X.509");
- for (String arg : args) {
- InputStream in = new BufferedInputStream(
- new FileInputStream(arg));
- try {
- X509Certificate cert =
- (X509Certificate) factory.generateCertificate(in);
- System.out.format("%s: %s%n", arg, getHostname(cert));
- } finally {
- in.close();
- }
- }
- }
-}
diff --git a/defensive-coding/src/.svn/text-base/TLS-Client-GNUTLS.c.svn-base
b/defensive-coding/src/.svn/text-base/TLS-Client-GNUTLS.c.svn-base
deleted file mode 100644
index 4ee2c82..0000000
--- a/defensive-coding/src/.svn/text-base/TLS-Client-GNUTLS.c.svn-base
+++ /dev/null
@@ -1,279 +0,0 @@
-#include <assert.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <gnutls/gnutls.h>
-#include <gnutls/crypto.h>
-#include <gnutls/x509.h>
-
-#include "tcp_connect.h"
-
-static void __attribute__((noreturn))
-usage(const char *progname)
-{
- fprintf(stderr, "usage: %s HOST PORT\n", progname);
- exit(2);
-}
-
-static void
-info_certificate_override(const char *reason,
- const gnutls_datum_t cert, const char *host)
-{
-#ifdef HAVE_GNUTLS_HASH_FAST
- unsigned char digest[20];
- assert(gnutls_hash_get_len(GNUTLS_DIG_SHA1) == sizeof(digest));
- int ret = gnutls_hash_fast(GNUTLS_DIG_SHA1,
- cert.data, cert.size, digest);
- if (ret < 0) {
- fprintf(stderr, "error: SHA1 digest failed: %s\n", gnutls_strerror(ret));
- exit(1);
- }
- fprintf(stderr, "info: %s override for "
- "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:"
- "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x%s%s%s\n",
- reason,
- digest[0], digest[1], digest[2], digest[3], digest[4],
- digest[5], digest[6], digest[7], digest[8], digest[9],
- digest[10], digest[11], digest[12], digest[13], digest[14],
- digest[15], digest[16], digest[17], digest[18], digest[19],
- host ? " (host name \"" : "", host ? host : "",
host ? "\")" : "");
-#endif
-}
-
-/* If certificate host name checking fails, this function is called to
- implement an alternative matching, based on user overrides. */
-static int
-certificate_host_name_override(const gnutls_datum_t cert, const char *host)
-{
- // Just a dummy implementation. User overrides must be keyed both
- // by certificate (or its hash) and host name.
- if (getenv("CERT_OVERRIDE") != NULL) {
- info_certificate_override("host name", cert, host);
- return 1;
- }
- return 0;
-}
-
-/* If certificate validity checking fails, this function provides a
- second chance to accept the peer certificate. If no user overrides
- are needed, this function can be removed. */
-static int
-certificate_validity_override(const gnutls_datum_t cert)
-{
- // Just a dummy implementation for testing. This should check a
- // user-maintained certificate store containing explicitly accepted
- // certificates.
- if (getenv("CERT_OVERRIDE") != NULL) {
- info_certificate_override("certificate validity", cert, NULL);
- return 1;
- }
- return 0;
-}
-
-int
-main(int argc, char **argv)
-{
- if (argc != 3) {
- usage(argv[0]);
- }
-
- //+ Features TLS-GNUTLS-Init
- gnutls_global_init();
- //-
-
- //+ Features TLS-Client-GNUTLS-Credentials
- // Load the trusted CA certificates.
- gnutls_certificate_credentials_t cred = NULL;
- int ret = gnutls_certificate_allocate_credentials (&cred);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_certificate_allocate_credentials: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
- // gnutls_certificate_set_x509_system_trust needs GNUTLS version 3.0
- // or newer, so we hard-code the path to the certificate store
- // instead.
- static const char ca_bundle[] = "/etc/ssl/certs/ca-bundle.crt";
- ret = gnutls_certificate_set_x509_trust_file
- (cred, ca_bundle, GNUTLS_X509_FMT_PEM);
- if (ret == 0) {
- fprintf(stderr, "error: no certificates found in: %s\n", ca_bundle);
- exit(1);
- }
- if (ret < 0) {
- fprintf(stderr, "error: gnutls_certificate_set_x509_trust_files(%s):
%s\n",
- ca_bundle, gnutls_strerror(ret));
- exit(1);
- }
- //-
-
- const char *host = argv[1];
- const char *service = argv[2];
- // Perform name lookup, create the TCP client socket, and connect to
- // the server.
- int sockfd = tcp_connect(host, service);
- if (sockfd < 0) {
- perror("connect");
- exit(1);
- }
-
- // Deactivate the Nagle algorithm.
- {
- const int val = 1;
- int ret = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
- if (ret < 0) {
- perror("setsockopt(TCP_NODELAY)");
- exit(1);
- }
- }
-
- //+ Features TLS-Client-GNUTLS-Connect
- // Create the session object.
- gnutls_session_t session;
- ret = gnutls_init(&session, GNUTLS_CLIENT);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_init: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
-
- // Configure the cipher preferences.
- const char *errptr = NULL;
- ret = gnutls_priority_set_direct(session, "NORMAL", &errptr);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_priority_set_direct: %s\n"
- "error: at: \"%s\"\n", gnutls_strerror(ret), errptr);
- exit(1);
- }
-
- // Install the trusted certificates.
- ret = gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, cred);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_credentials_set: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
-
- // Associate the socket with the session object and set the server
- // name.
- gnutls_transport_set_ptr(session, (gnutls_transport_ptr_t)(uintptr_t)sockfd);
- ret = gnutls_server_name_set(session, GNUTLS_NAME_DNS,
- host, strlen(host));
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_server_name_set: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
-
- // Establish the session.
- ret = gnutls_handshake(session);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_handshake: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
- //-
-
- //+ Features TLS-Client-GNUTLS-Verify
- // Obtain the server certificate chain. The server certificate
- // itself is stored in the first element of the array.
- unsigned certslen = 0;
- const gnutls_datum_t *const certs =
- gnutls_certificate_get_peers(session, &certslen);
- if (certs == NULL || certslen == 0) {
- fprintf(stderr, "error: could not obtain peer certificate\n");
- exit(1);
- }
-
- // Validate the certificate chain.
- unsigned status = (unsigned)-1;
- ret = gnutls_certificate_verify_peers2(session, &status);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_certificate_verify_peers2: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
- if (status != 0 && !certificate_validity_override(certs[0])) {
- gnutls_datum_t msg;
-#if GNUTLS_VERSION_AT_LEAST_3_1_4
- int type = gnutls_certificate_type_get (session);
- ret = gnutls_certificate_verification_status_print(status, type, &out, 0);
-#else
- ret = -1;
-#endif
- if (ret == 0) {
- fprintf(stderr, "error: %s\n", msg.data);
- gnutls_free(msg.data);
- exit(1);
- } else {
- fprintf(stderr, "error: certificate validation failed with code 0x%x\n",
- status);
- exit(1);
- }
- }
- //-
-
- //+ Features TLS-Client-GNUTLS-Match
- // Match the peer certificate against the host name.
- // We can only obtain a set of DER-encoded certificates from the
- // session object, so we have to re-parse the peer certificate into
- // a certificate object.
- gnutls_x509_crt_t cert;
- ret = gnutls_x509_crt_init(&cert);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_x509_crt_init: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
- // The peer certificate is the first certificate in the list.
- ret = gnutls_x509_crt_import(cert, certs, GNUTLS_X509_FMT_DER);
- if (ret != GNUTLS_E_SUCCESS) {
- fprintf(stderr, "error: gnutls_x509_crt_import: %s\n",
- gnutls_strerror(ret));
- exit(1);
- }
- ret = gnutls_x509_crt_check_hostname(cert, host);
- if (ret == 0 && !certificate_host_name_override(certs[0], host)) {
- fprintf(stderr, "error: host name does not match certificate\n");
- exit(1);
- }
- gnutls_x509_crt_deinit(cert);
- //-
-
- //+ Features TLS-GNUTLS-Use
- char buf[4096];
- snprintf(buf, sizeof(buf), "GET / HTTP/1.0\r\nHost: %s\r\n\r\n", host);
- ret = gnutls_record_send(session, buf, strlen(buf));
- if (ret < 0) {
- fprintf(stderr, "error: gnutls_record_send: %s\n", gnutls_strerror(ret));
- exit(1);
- }
- ret = gnutls_record_recv(session, buf, sizeof(buf));
- if (ret < 0) {
- fprintf(stderr, "error: gnutls_record_recv: %s\n", gnutls_strerror(ret));
- exit(1);
- }
- //-
- write(STDOUT_FILENO, buf, ret);
-
- //+ Features TLS-GNUTLS-Disconnect
- // Initiate an orderly connection shutdown.
- ret = gnutls_bye(session, GNUTLS_SHUT_RDWR);
- if (ret < 0) {
- fprintf(stderr, "error: gnutls_bye: %s\n", gnutls_strerror(ret));
- exit(1);
- }
- // Free the session object.
- gnutls_deinit(session);
- //-
-
- //+ Features TLS-GNUTLS-Credentials-Close
- gnutls_certificate_free_credentials(cred);
- //-
-}
diff --git a/defensive-coding/src/.svn/text-base/TLS-Client-NSS.c.svn-base
b/defensive-coding/src/.svn/text-base/TLS-Client-NSS.c.svn-base
deleted file mode 100644
index de9e6db..0000000
--- a/defensive-coding/src/.svn/text-base/TLS-Client-NSS.c.svn-base
+++ /dev/null
@@ -1,297 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "tcp_connect.h"
-
-//+ Features TLS-NSS-Includes
-// NSPR include files
-#include <prerror.h>
-#include <prinit.h>
-
-// NSS include files
-#include <nss.h>
-#include <pk11pub.h>
-#include <secmod.h>
-#include <ssl.h>
-#include <sslproto.h>
-
-// Private API, no other way to turn a POSIX file descriptor into an
-// NSPR handle.
-NSPR_API(PRFileDesc*) PR_ImportTCPSocket(int);
-//-
-
-static void __attribute__((noreturn))
-usage(const char *progname)
-{
- fprintf(stderr, "usage: %s HOST PORT\n", progname);
- exit(2);
-}
-
-SECStatus
-bad_certificate(void *arg, PRFileDesc *fd)
-{
- const char *host = arg;
- CERTCertificate *cert = SSL_PeerCertificate(fd);
- if (cert == NULL) {
- return SECFailure;
- }
-
- // Just a dummy implementation. User overrides must be keyed both
- // by certificate (or its hash) and host name.
- if (getenv("CERT_OVERRIDE") != NULL) {
- unsigned char sha1[20];
- if (PK11_HashBuf(SEC_OID_SHA1, sha1,
- cert->derCert.data, cert->derCert.len) != SECSuccess) {
- fprintf(stderr, "error: could not hash certificate\n");
- return SECFailure;
- }
- SECItem si = {.data = sha1, .len = sizeof(sha1)};
- char *hex = CERT_Hexify(&si, 1);
- if (hex == NULL) {
- fprintf(stderr, "error: could not hash certificate\n");
- return SECFailure;
- }
- fprintf(stderr, "info: certificate override for %s (host name %s)\n",
- hex, host);
- PORT_Free(hex);
- CERT_DestroyCertificate(cert);
- return SECSuccess;
- }
- CERT_DestroyCertificate(cert);
- return SECFailure;
-}
-
-int
-main(int argc, char **argv)
-{
- if (argc != 3) {
- usage(argv[0]);
- }
-
- const char *host = argv[1];
- const char *service = argv[2];
- // Perform name lookup, create the TCP client socket, and connect to
- // the server.
- int sockfd = tcp_connect(host, service);
- if (sockfd < 0) {
- perror("connect");
- exit(1);
- }
-
- // Deactivate the Nagle algorithm.
- {
- const int val = 1;
- int ret = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
- if (ret < 0) {
- perror("setsockopt(TCP_NODELAY)");
- exit(1);
- }
- }
-
- //+ Features TLS-NSS-Init
- PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
- NSSInitContext *const ctx =
- NSS_InitContext("sql:/etc/pki/nssdb", "", "",
"", NULL,
- NSS_INIT_READONLY | NSS_INIT_PK11RELOAD);
- if (ctx == NULL) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: NSPR error code %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
-
- // Ciphers to enable.
- static const PRUint16 good_ciphers[] = {
- TLS_RSA_WITH_AES_128_CBC_SHA,
- TLS_RSA_WITH_AES_256_CBC_SHA,
- SSL_RSA_WITH_3DES_EDE_CBC_SHA,
- SSL_NULL_WITH_NULL_NULL // sentinel
- };
-
- // Check if the current policy allows any strong ciphers. If it
- // doesn't, switch to the "domestic" (unrestricted) policy. This is
- // not thread-safe and has global impact. Consequently, we only do
- // it if absolutely necessary.
- int found_good_cipher = 0;
- for (const PRUint16 *p = good_ciphers; *p != SSL_NULL_WITH_NULL_NULL;
- ++p) {
- PRInt32 policy;
- if (SSL_CipherPolicyGet(*p, &policy) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: policy for cipher %u: error %d: %s\n",
- (unsigned)*p, err, PR_ErrorToName(err));
- exit(1);
- }
- if (policy == SSL_ALLOWED) {
- fprintf(stderr, "info: found cipher %x\n", (unsigned)*p);
- found_good_cipher = 1;
- break;
- }
- }
- if (!found_good_cipher) {
- if (NSS_SetDomesticPolicy() != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: NSS_SetDomesticPolicy: error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- }
-
- // Initialize the trusted certificate store.
- char module_name[] = "library=libnssckbi.so name=\"Root Certs\"";
- SECMODModule *module = SECMOD_LoadUserModule(module_name, NULL, PR_FALSE);
- if (module == NULL || !module->loaded) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: NSPR error code %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- //-
-
- //+ Features TLS-Client-NSS-Connect
- // Wrap the POSIX file descriptor. This is an internal NSPR
- // function, but it is very unlikely to change.
- PRFileDesc* nspr = PR_ImportTCPSocket(sockfd);
- sockfd = -1; // Has been taken over by NSPR.
-
- // Add the SSL layer.
- {
- PRFileDesc *model = PR_NewTCPSocket();
- PRFileDesc *newfd = SSL_ImportFD(NULL, model);
- if (newfd == NULL) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: NSPR error code %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- model = newfd;
- newfd = NULL;
- if (SSL_OptionSet(model, SSL_ENABLE_SSL2, PR_FALSE) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: set SSL_ENABLE_SSL2 error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- if (SSL_OptionSet(model, SSL_V2_COMPATIBLE_HELLO, PR_FALSE) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: set SSL_V2_COMPATIBLE_HELLO error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- if (SSL_OptionSet(model, SSL_ENABLE_DEFLATE, PR_FALSE) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: set SSL_ENABLE_DEFLATE error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
-
- // Disable all ciphers (except RC4-based ciphers, for backwards
- // compatibility).
- const PRUint16 *const ciphers = SSL_GetImplementedCiphers();
- for (unsigned i = 0; i < SSL_GetNumImplementedCiphers(); i++) {
- if (ciphers[i] != SSL_RSA_WITH_RC4_128_SHA
- && ciphers[i] != SSL_RSA_WITH_RC4_128_MD5) {
- if (SSL_CipherPrefSet(model, ciphers[i], PR_FALSE) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: disable cipher %u: error %d: %s\n",
- (unsigned)ciphers[i], err, PR_ErrorToName(err));
- exit(1);
- }
- }
- }
-
- // Enable the strong ciphers.
- for (const PRUint16 *p = good_ciphers; *p != SSL_NULL_WITH_NULL_NULL;
- ++p) {
- if (SSL_CipherPrefSet(model, *p, PR_TRUE) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: enable cipher %u: error %d: %s\n",
- (unsigned)*p, err, PR_ErrorToName(err));
- exit(1);
- }
- }
-
- // Allow overriding invalid certificate.
- if (SSL_BadCertHook(model, bad_certificate, (char *)host) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: SSL_BadCertHook error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
-
- newfd = SSL_ImportFD(model, nspr);
- if (newfd == NULL) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: SSL_ImportFD error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- nspr = newfd;
- PR_Close(model);
- }
-
- // Perform the handshake.
- if (SSL_ResetHandshake(nspr, PR_FALSE) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: SSL_ResetHandshake error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- if (SSL_SetURL(nspr, host) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: SSL_SetURL error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- if (SSL_ForceHandshake(nspr) != SECSuccess) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: SSL_ForceHandshake error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- //-
-
- //+ Features TLS-NSS-Use
- char buf[4096];
- snprintf(buf, sizeof(buf), "GET / HTTP/1.0\r\nHost: %s\r\n\r\n", host);
- PRInt32 ret = PR_Write(nspr, buf, strlen(buf));
- if (ret < 0) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: PR_Write error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- ret = PR_Read(nspr, buf, sizeof(buf));
- if (ret < 0) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: PR_Read error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- //-
- write(STDOUT_FILENO, buf, ret);
-
- //+ Features TLS-Client-NSS-Close
- // Send close_notify alert.
- if (PR_Shutdown(nspr, PR_SHUTDOWN_BOTH) != PR_SUCCESS) {
- const PRErrorCode err = PR_GetError();
- fprintf(stderr, "error: PR_Read error %d: %s\n",
- err, PR_ErrorToName(err));
- exit(1);
- }
- // Closes the underlying POSIX file descriptor, too.
- PR_Close(nspr);
- //-
-
- //+ Features TLS-NSS-Close
- SECMOD_DestroyModule(module);
- NSS_ShutdownContext(ctx);
- //-
-
- return 0;
-}
diff --git a/defensive-coding/src/.svn/text-base/TLS-Client-OpenSSL.c.svn-base
b/defensive-coding/src/.svn/text-base/TLS-Client-OpenSSL.c.svn-base
deleted file mode 100644
index b8a279a..0000000
--- a/defensive-coding/src/.svn/text-base/TLS-Client-OpenSSL.c.svn-base
+++ /dev/null
@@ -1,329 +0,0 @@
-#include <errno.h>
-#include <netdb.h>
-#include <netinet/tcp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <openssl/bio.h>
-#include <openssl/conf.h>
-#include <openssl/err.h>
-#include <openssl/ssl.h>
-
-#include "tcp_connect.h"
-
-int X509_check_host(X509 *, const unsigned char *chk, size_t chklen,
- unsigned int flags);
-
-static void __attribute__((noreturn))
-usage(const char *progname)
-{
- fprintf(stderr, "usage: %s HOST PORT\n", progname);
- exit(2);
-}
-
-static void
-info_certificate_override(const char *reason, X509 *crt, const char *host)
-{
- int derlen = i2d_X509(crt, NULL);
- if (derlen < 0) {
- fprintf(stderr, "error: could not DER-encode certificate\n");
- exit(1);
- }
- unsigned char *der = malloc(derlen);
- if (der == NULL) {
- perror("malloc");
- exit(1);
- }
- {
- unsigned char *p = der;
- if (i2d_X509(crt, &p) < 0) {
- fprintf(stderr, "error: could not DER-encode certificate\n");
- exit(1);
- }
- }
- unsigned char digest[20];
- SHA1(der, derlen, digest);
- fprintf(stderr, "info: %s override for "
- "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:"
- "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x%s%s%s\n",
- reason,
- digest[0], digest[1], digest[2], digest[3], digest[4],
- digest[5], digest[6], digest[7], digest[8], digest[9],
- digest[10], digest[11], digest[12], digest[13], digest[14],
- digest[15], digest[16], digest[17], digest[18], digest[19],
- host ? " (host name \"" : "", host ? host : "",
host ? "\")" : "");
- free(der);
-}
-
-/* If certificate host name checking fails, this function is called to
- implement an alternative matching, based on user overrides. */
-static int
-certificate_host_name_override(X509 *crt, const char *host)
-{
- // Just a dummy implementation. User overrides must be keyed both
- // by certificate (or its hash) and host name.
- if (getenv("CERT_OVERRIDE") != NULL) {
- info_certificate_override("host name", crt, host);
- return 1;
- }
- return 0;
-}
-
-/* If certificate validity checking fails, this function provides a
- second chance to accept the peer certificate. If no user overrides
- are needed, this function can be removed. */
-static int
-certificate_validity_override(X509 *crt)
-{
- // Just a dummy implementation for testing. This should check a
- // user-maintained certificate store containing explicitly accepted
- // certificates.
- if (getenv("CERT_OVERRIDE") != NULL) {
- info_certificate_override("certificate validity", crt, NULL);
- return 1;
- }
- return 0;
-}
-
-static void __attribute__((noreturn))
-failure(const char *msg)
-{
- fprintf(stderr, "error: %s: %s\n", msg, strerror(errno));
- exit(2);
-}
-
-//+ Features TLS-OpenSSL-Errors
-static void __attribute__((noreturn))
-ssl_print_error_and_exit(SSL *ssl, const char *op, int ret)
-{
- int subcode = SSL_get_error(ssl, ret);
- switch (subcode) {
- case SSL_ERROR_NONE:
- fprintf(stderr, "error: %s: no error to report\n", op);
- break;
- case SSL_ERROR_WANT_READ:
- case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_X509_LOOKUP:
- case SSL_ERROR_WANT_CONNECT:
- case SSL_ERROR_WANT_ACCEPT:
- fprintf(stderr, "error: %s: invalid blocking state %d\n", op, subcode);
- break;
- case SSL_ERROR_SSL:
- fprintf(stderr, "error: %s: TLS layer problem\n", op);
- case SSL_ERROR_SYSCALL:
- fprintf(stderr, "error: %s: system call failed: %s\n", op,
strerror(errno));
- break;
- case SSL_ERROR_ZERO_RETURN:
- fprintf(stderr, "error: %s: zero return\n", op);
- }
- exit(1);
-}
-//-
-
-int
-main(int argc, char **argv)
-{
- if (argc != 3) {
- usage(argv[0]);
- }
-
- BIO *bio_err=BIO_new_fp(stderr, BIO_NOCLOSE);
- if (bio_err == NULL) {
- perror("BIO_ne_fp(stderr)");
- exit(1);
- }
-
- //+ Features TLS-Client-OpenSSL-Init
- // The following call prints an error message and calls exit() if
- // the OpenSSL configuration file is unreadable.
- OPENSSL_config(NULL);
- // Provide human-readable error messages.
- SSL_load_error_strings();
- // Register ciphers.
- SSL_library_init();
- //-
-
- //+ Features TLS-Client-OpenSSL-CTX
- // Configure a client connection context. Send a hendshake for the
- // highest supported TLS version, and disable compression.
- const SSL_METHOD *const req_method = SSLv23_client_method();
- SSL_CTX *const ctx = SSL_CTX_new(req_method);
- if (ctx == NULL) {
- ERR_print_errors(bio_err);
- exit(1);
- }
- SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_COMPRESSION);
-
- // Adjust the ciphers list based on a whitelist. First enable all
- // ciphers of at least medium strength, to get the list which is
- // compiled into OpenSSL.
- if (SSL_CTX_set_cipher_list(ctx, "HIGH:MEDIUM") != 1) {
- ERR_print_errors(bio_err);
- exit(1);
- }
- {
- // Create a dummy SSL session to obtain the cipher list.
- SSL *ssl = SSL_new(ctx);
- if (ssl == NULL) {
- ERR_print_errors(bio_err);
- exit(1);
- }
- STACK_OF(SSL_CIPHER) *active_ciphers = SSL_get_ciphers(ssl);
- if (active_ciphers == NULL) {
- ERR_print_errors(bio_err);
- exit(1);
- }
- // Whitelist of candidate ciphers.
- static const char *const candidates[] = {
- "AES128-GCM-SHA256", "AES128-SHA256",
"AES256-SHA256", // strong ciphers
- "AES128-SHA", "AES256-SHA", // strong ciphers, also in older
versions
- "RC4-SHA", "RC4-MD5", // backwards compatibility, supposed to
be weak
- "DES-CBC3-SHA", "DES-CBC3-MD5", // more backwards
compatibility
- NULL
- };
- // Actually selected ciphers.
- char ciphers[300];
- ciphers[0] = '\0';
- for (const char *const *c = candidates; *c; ++c) {
- for (int i = 0; i < sk_SSL_CIPHER_num(active_ciphers); ++i) {
- if (strcmp(SSL_CIPHER_get_name(sk_SSL_CIPHER_value(active_ciphers, i)),
- *c) == 0) {
- if (*ciphers) {
- strcat(ciphers, ":");
- }
- strcat(ciphers, *c);
- break;
- }
- }
- }
- SSL_free(ssl);
- // Apply final cipher list.
- if (SSL_CTX_set_cipher_list(ctx, ciphers) != 1) {
- ERR_print_errors(bio_err);
- exit(1);
- }
- }
-
- // Load the set of trusted root certificates.
- if (!SSL_CTX_set_default_verify_paths(ctx)) {
- ERR_print_errors(bio_err);
- exit(1);
- }
- //-
-
- const char *host = argv[1];
- const char *service = argv[2];
- // Perform name lookup, create the TCP client socket, and connect to
- // the server.
- int sockfd = tcp_connect(host, service);
- if (sockfd < 0) {
- perror("connect");
- exit(1);
- }
- // Deactivate the Nagle algorithm.
- //+ Features TLS-Nagle
- const int val = 1;
- int ret = setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
- if (ret < 0) {
- perror("setsockopt(TCP_NODELAY)");
- exit(1);
- }
- //-
- //+ Features TLS-Client-OpenSSL-Connect
- // Create the connection object.
- SSL *ssl = SSL_new(ctx);
- if (ssl == NULL) {
- ERR_print_errors(bio_err);
- exit(1);
- }
- SSL_set_fd(ssl, sockfd);
-
- // Enable the ServerNameIndication extension
- if (!SSL_set_tlsext_host_name(ssl, host)) {
- ERR_print_errors(bio_err);
- exit(1);
- }
-
- // Perform the TLS handshake with the server.
- ret = SSL_connect(ssl);
- if (ret != 1) {
- // Error status can be 0 or negative.
- ssl_print_error_and_exit(ssl, "SSL_connect", ret);
- }
-
- // Obtain the server certificate.
- X509 *peercert = SSL_get_peer_certificate(ssl);
- if (peercert == NULL) {
- fprintf(stderr, "peer certificate missing");
- exit(1);
- }
-
- // Check the certificate verification result. Allow an explicit
- // certificate validation override in case verification fails.
- int verifystatus = SSL_get_verify_result(ssl);
- if (verifystatus != X509_V_OK && !certificate_validity_override(peercert)) {
- fprintf(stderr, "SSL_connect: verify result: %s\n",
- X509_verify_cert_error_string(verifystatus));
- exit(1);
- }
-
- // Check if the server certificate matches the host name used to
- // establish the connection.
- // FIXME: Currently needs OpenSSL 1.1.
- if (X509_check_host(peercert, (const unsigned char *)host, strlen(host),
- 0) != 1
- && !certificate_host_name_override(peercert, host)) {
- fprintf(stderr, "SSL certificate does not match host name\n");
- exit(1);
- }
-
- X509_free(peercert);
-
- //-
- //+ Features TLS-Client-OpenSSL-Connection-Use
- const char *const req = "GET / HTTP/1.0\r\n\r\n";
- if (SSL_write(ssl, req, strlen(req)) < 0) {
- ssl_print_error_and_exit(ssl, "SSL_write", ret);
- }
- char buf[4096];
- ret = SSL_read(ssl, buf, sizeof(buf));
- if (ret < 0) {
- ssl_print_error_and_exit(ssl, "SSL_read", ret);
- }
- //-
- write(STDOUT_FILENO, buf, ret);
- //+ Features TLS-OpenSSL-Connection-Close
- // Send the close_notify alert.
- ret = SSL_shutdown(ssl);
- switch (ret) {
- case 1:
- // A close_notify alert has already been received.
- break;
- case 0:
- // Wait for the close_notify alert from the peer.
- ret = SSL_shutdown(ssl);
- switch (ret) {
- case 0:
- fprintf(stderr, "info: second SSL_shutdown returned zero\n");
- break;
- case 1:
- break;
- default:
- ssl_print_error_and_exit(ssl, "SSL_shutdown 2", ret);
- }
- break;
- default:
- ssl_print_error_and_exit(ssl, "SSL_shutdown 1", ret);
- }
- SSL_free(ssl);
- close(sockfd);
- //-
- //+ Features TLS-OpenSSL-Context-Close
- SSL_CTX_free(ctx);
- //-
- BIO_free(bio_err);
- return 0;
-}
diff --git a/defensive-coding/src/.svn/text-base/TLS-Client-Python.py.svn-base
b/defensive-coding/src/.svn/text-base/TLS-Client-Python.py.svn-base
deleted file mode 100644
index c91f47b..0000000
--- a/defensive-coding/src/.svn/text-base/TLS-Client-Python.py.svn-base
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/python
-
-# WARNING: See the guidelines for problems with this code!
-
-import socket
-import ssl
-import sys
-
-_, host, port = sys.argv
-
-#+ Features TLS-Client-Python-check_host_name
-def check_host_name(peercert, name):
- """Simple certificate/host name checker. Returns True if the
- certificate matches, False otherwise. Does not support
- wildcards."""
- # Check that the peer has supplied a certificate.
- # None/{} is not acceptable.
- if not peercert:
- return False
- if peercert.has_key("subjectAltName"):
- for typ, val in peercert["subjectAltName"]:
- if typ == "DNS" and val == name:
- return True
- else:
- # Only check the subject DN if there is no subject alternative
- # name.
- cn = None
- for attr, val in peercert["subject"]:
- # Use most-specific (last) commonName attribute.
- if attr == "commonName":
- cn = val
- if cn is not None:
- return cn == name
- return False
-#-
-
-# WARNING: See the guidelines for problems with this code!
-
-sock = socket.create_connection((host, port))
-#+ Features TLS-Client-Python-Connect
-sock = ssl.wrap_socket(sock,
- ciphers="HIGH:-aNULL:-eNULL:-PSK:RC4-SHA:RC4-MD5",
- ssl_version=ssl.PROTOCOL_TLSv1,
- cert_reqs=ssl.CERT_REQUIRED,
- ca_certs='/etc/ssl/certs/ca-bundle.crt')
-# getpeercert() triggers the handshake as a side effect.
-if not check_host_name(sock.getpeercert(), host):
- raise IOError("peer certificate does not match host name")
-#-
-#+ Features TLS-Python-Use
-sock.write("GET / HTTP/1.1\r\nHost: " + host + "\r\n\r\n")
-print sock.read()
-#-
-#+ Features TLS-Python-Close
-sock.close()
-#-
diff --git a/defensive-coding/src/.svn/text-base/TLSClientOpenJDK.java.svn-base
b/defensive-coding/src/.svn/text-base/TLSClientOpenJDK.java.svn-base
deleted file mode 100644
index f791857..0000000
--- a/defensive-coding/src/.svn/text-base/TLSClientOpenJDK.java.svn-base
+++ /dev/null
@@ -1,262 +0,0 @@
-//+ Features TLS-Client-OpenJDK-Import
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.cert.CertificateEncodingException;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLParameters;
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-import sun.security.util.HostnameChecker;
-//-
-
-import java.security.MessageDigest;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.nio.charset.Charset;
-
-public class TLSClientOpenJDK {
- public static void main(String[] args) throws Exception {
- if (args.length == 0) {
- usage();
- }
- int index = 0;
- byte[] certHash = null;
- if (args[index].equals("--accept")) {
- ++index;
- if (args.length != 4) {
- usage();
- }
- certHash = decodeHex(args[index++]);
- } else if (args.length != 2) {
- usage();
- }
-
- String host = args[index++];
- int port;
- try {
- port = Integer.parseInt(args[index]);
- } catch (NumberFormatException e) {
- port = 0;
- }
- if (port <= 0 || port > 65535) {
- usage();
- }
-
- SSLContext ctx;
- if (certHash == null) {
- ctx = createContext();
- } else {
- ctx = createContextForCertificate(certHash);
- }
-
- SSLParameters params = createParameters(ctx);
- if (certHash == null) {
- params.setEndpointIdentificationAlgorithm(null);
- }
- runDemo(ctx, params, host, port);
- }
-
- private static SSLContext createContext() throws Exception {
- //+ Features TLS-Client-OpenJDK-Context
- // Create the context. Specify the SunJSSE provider to avoid
- // picking up third-party providers. Try the TLS 1.2 provider
- // first, then fall back to TLS 1.0.
- SSLContext ctx;
- try {
- ctx = SSLContext.getInstance("TLSv1.2", "SunJSSE");
- } catch (NoSuchAlgorithmException e) {
- try {
- ctx = SSLContext.getInstance("TLSv1", "SunJSSE");
- } catch (NoSuchAlgorithmException e1) {
- // The TLS 1.0 provider should always be available.
- throw new AssertionError(e1);
- } catch (NoSuchProviderException e1) {
- throw new AssertionError(e1);
- }
- } catch (NoSuchProviderException e) {
- // The SunJSSE provider should always be available.
- throw new AssertionError(e);
- }
- ctx.init(null, null, null);
- //-
- return ctx;
- }
-
- static
- //+ Features TLS-Client-OpenJDK-MyTrustManager
- public class MyTrustManager implements X509TrustManager {
- private final byte[] certHash;
-
- public MyTrustManager(byte[] certHash) throws Exception {
- this.certHash = certHash;
- }
-
- @Override
- public void checkClientTrusted(X509Certificate[] chain, String authType)
- throws CertificateException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void checkServerTrusted(X509Certificate[] chain,
- String authType) throws CertificateException {
- byte[] digest = getCertificateDigest(chain[0]);
- String digestHex = formatHex(digest);
-
- if (Arrays.equals(digest, certHash)) {
- System.err.println("info: accepting certificate: " +
digestHex);
- } else {
- throw new CertificateException("certificate rejected: " +
- digestHex);
- }
- }
-
- @Override
- public X509Certificate[] getAcceptedIssuers() {
- return new X509Certificate[0];
- }
- }
- //-
-
- private static SSLContext createContextForCertificate(byte[] certHash)
- throws Exception {
- //+ Features TLS-Client-OpenJDK-Context_For_Cert
- SSLContext ctx;
- try {
- ctx = SSLContext.getInstance("TLSv1.2", "SunJSSE");
- } catch (NoSuchAlgorithmException e) {
- try {
- ctx = SSLContext.getInstance("TLSv1", "SunJSSE");
- } catch (NoSuchAlgorithmException e1) {
- throw new AssertionError(e1);
- } catch (NoSuchProviderException e1) {
- throw new AssertionError(e1);
- }
- } catch (NoSuchProviderException e) {
- throw new AssertionError(e);
- }
- MyTrustManager tm = new MyTrustManager(certHash);
- ctx.init(null, new TrustManager[] {tm}, null);
- //-
- return ctx;
- }
-
- private static SSLParameters createParameters(SSLContext ctx)
- throws Exception {
- //+ Features TLS-OpenJDK-Parameters
- // Prepare TLS parameters. These have to applied to every TLS
- // socket before the handshake is triggered.
- SSLParameters params = ctx.getDefaultSSLParameters();
- // Do not send an SSL-2.0-compatible Client Hello.
- ArrayList<String> protocols = new ArrayList<String>(
- Arrays.asList(params.getProtocols()));
- protocols.remove("SSLv2Hello");
- params.setProtocols(protocols.toArray(new String[protocols.size()]));
- // Adjust the supported ciphers.
- ArrayList<String> ciphers = new ArrayList<String>(
- Arrays.asList(params.getCipherSuites()));
- ciphers.retainAll(Arrays.asList(
- "TLS_RSA_WITH_AES_128_CBC_SHA256",
- "TLS_RSA_WITH_AES_256_CBC_SHA256",
- "TLS_RSA_WITH_AES_256_CBC_SHA",
- "TLS_RSA_WITH_AES_128_CBC_SHA",
- "SSL_RSA_WITH_3DES_EDE_CBC_SHA",
- "SSL_RSA_WITH_RC4_128_SHA1",
- "SSL_RSA_WITH_RC4_128_MD5",
- "TLS_EMPTY_RENEGOTIATION_INFO_SCSV"));
- params.setCipherSuites(ciphers.toArray(new String[ciphers.size()]));
- //-
- // Activate host name verification. Requires OpenJDK 7.
- //+ Features TLS-Client-OpenJDK-Hostname
- params.setEndpointIdentificationAlgorithm("HTTPS");
- //-
- return params;
- }
-
- private static void runDemo(SSLContext ctx, SSLParameters params,
- String host, int port) throws Exception {
- // Note: The code below misses the close() call, to avoid
- // messing up the indentation in the generated documentation.
-
- //+ Features TLS-Client-OpenJDK-Connect
- // Create the socket and connect it at the TCP layer.
- SSLSocket socket = (SSLSocket) ctx.getSocketFactory()
- .createSocket(host, port);
-
- // Disable the Nagle algorithm.
- socket.setTcpNoDelay(true);
-
- // Adjust ciphers and protocols.
- socket.setSSLParameters(params);
-
- // Perform the handshake.
- socket.startHandshake();
-
- // Validate the host name. The match() method throws
- // CertificateException on failure.
- X509Certificate peer = (X509Certificate)
- socket.getSession().getPeerCertificates()[0];
- // This is the only way to perform host name checking on OpenJDK 6.
- HostnameChecker.getInstance(HostnameChecker.TYPE_TLS).match(
- host, peer);
- //-
-
- //+ Features TLS-Client-OpenJDK-Use
- socket.getOutputStream().write("GET / HTTP/1.0\r\n\r\n"
- .getBytes(Charset.forName("UTF-8")));
- byte[] buffer = new byte[4096];
- int count = socket.getInputStream().read(buffer);
- System.out.write(buffer, 0, count);
- //-
- }
-
- private static byte[] decodeHex(String s) {
- byte[] result = new byte[32];
- if (s.length() != result.length * 2) {
- throw new IllegalArgumentException(s);
- }
- for (int i = 0; i < result.length; ++i) {
- int a = Character.digit(s.charAt(2 * i), 16);
- int b = Character.digit(s.charAt(2 * i + 1), 16);
- if (a < 0 || b < 0) {
- throw new IllegalArgumentException(s);
- }
- result[i] = (byte) ((a << 4) | b);
- }
- return result;
- }
-
- private static String formatHex(byte[] digest) {
- String digestHex;
- {
- StringBuilder sb = new StringBuilder(digest.length * 2);
- for (byte b : digest) {
- sb.append(String.format("%02x", b & 0xFF));
- }
- digestHex = sb.toString();
- }
- return digestHex;
- }
-
- private static byte[] getCertificateDigest(X509Certificate chain)
- throws AssertionError, CertificateEncodingException {
- MessageDigest md;
- try {
- md = MessageDigest.getInstance("SHA-256");
- } catch (NoSuchAlgorithmException e1) {
- throw new AssertionError(e1);
- }
- byte[] digest = md.digest(chain.getEncoded());
- return digest;
- }
-
- private static void usage() {
- System.err.format("usage: %s [--accept CERT-HASH] HOST PORT%n",
- TLSClientOpenJDK.class.getName());
- System.exit(1);
- }
-}
diff --git a/defensive-coding/src/.svn/text-base/XML-Parser-Expat.c.svn-base
b/defensive-coding/src/.svn/text-base/XML-Parser-Expat.c.svn-base
deleted file mode 100644
index 0f2c609..0000000
--- a/defensive-coding/src/.svn/text-base/XML-Parser-Expat.c.svn-base
+++ /dev/null
@@ -1,135 +0,0 @@
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <expat.h>
-
-static void
-print_escaped(const char *p, size_t len)
-{
- const char *end = p + len;
- while (p < end) {
- unsigned char ch = *p;
- // Technically, we should also match on certain UTF-8 sequences,
- // but this is not implemented here.
- if ((0x01 <= ch && ch <= 0x08)
- || ch == 0x0B || ch == 0x0C
- || (0x0E <= ch && ch <= 0x1F)
- || ch == '"' || ch == '\'' || ch == '<' || ch ==
'>' || ch == '"'
- || ch == 0x7F) {
- printf("&#%d;", (int)ch);
- } else {
- putc(ch, stdout);
- }
- ++p;
- }
-}
-
-static void
-StartElementHandler(void *userData,
- const XML_Char *name, const XML_Char **attrs)
-{
- printf("<%s", name);
- while (*attrs) {
- printf(" %s=\"", *attrs);
- ++attrs;
- print_escaped(*attrs, strlen(*attrs));
- ++attrs;
- putc('"', stdout);
- }
- putc('>', stdout);
-}
-
-static void
-EndElementHandler(void *userData, const XML_Char *name)
-{
- printf("</%s>", name);
-}
-
-static void
-CharacterDataHandler(void *userData, const XML_Char *s, int len)
-{
- print_escaped(s, len);
-}
-
-static void
-CommentHandler(void *userData, const XML_Char *s)
-{
- printf("<!-- %s -->", s);
-}
-
-//+ Tasks Serialization-XML-Expat-EntityDeclHandler
-// Stop the parser when an entity declaration is encountered.
-static void
-EntityDeclHandler(void *userData,
- const XML_Char *entityName, int is_parameter_entity,
- const XML_Char *value, int value_length,
- const XML_Char *base, const XML_Char *systemId,
- const XML_Char *publicId, const XML_Char *notationName)
-{
- XML_StopParser((XML_Parser)userData, XML_FALSE);
-}
-//-
-
-int
-main(int argc, char **argv)
-{
- if (argc != 2) {
- fprintf(stderr, "usage: %s XML-FILE\n", argv[0]);
- return 2;
- }
-
- const char *file = argv[1];
- int fd = open(file, O_RDONLY | O_CLOEXEC);
- if (fd < 0) {
- perror("open");
- return 1;
- }
-
- //+ Tasks Serialization-XML-Expat-Create
- XML_Parser parser = XML_ParserCreate("UTF-8");
- if (parser == NULL) {
- fprintf(stderr, "XML_ParserCreate failed\n");
- close(fd);
- exit(1);
- }
- // EntityDeclHandler needs a reference to the parser to stop
- // parsing.
- XML_SetUserData(parser, parser);
- // Disable entity processing, to inhibit entity expansion.
- XML_SetEntityDeclHandler(parser, EntityDeclHandler);
- //-
-
- // Handlers for demonstration purposes.
- XML_SetElementHandler(parser, StartElementHandler, EndElementHandler);
- XML_SetCharacterDataHandler(parser, CharacterDataHandler);
- XML_SetCommentHandler(parser, CommentHandler);
-
-
- char buffer[8192];
- ssize_t ret;
- do {
- ret = read(fd, buffer, sizeof(buffer));
- if (ret < 0) {
- perror("read");
- XML_ParserFree(parser);
- close(fd);
- return 1;
- }
- enum XML_Status status = XML_Parse(parser, buffer, ret, ret == 0);
- if (status != XML_STATUS_OK) {
- fprintf(stderr, "%s:%zu:%zu: error: %s\n",
- file, XML_GetCurrentLineNumber(parser),
- XML_GetCurrentColumnNumber(parser),
- XML_ErrorString(XML_GetErrorCode(parser)));
- XML_ParserFree(parser);
- close(fd);
- return 1;
- }
- } while (ret != 0);
-
- XML_ParserFree(parser);
- close(fd);
- return 0;
-}
diff --git a/defensive-coding/src/.svn/text-base/XMLParserOpenJDK.java.svn-base
b/defensive-coding/src/.svn/text-base/XMLParserOpenJDK.java.svn-base
deleted file mode 100644
index be3bef3..0000000
--- a/defensive-coding/src/.svn/text-base/XMLParserOpenJDK.java.svn-base
+++ /dev/null
@@ -1,286 +0,0 @@
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-//+ Tasks Serialization-XML-OpenJDK-Imports
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-//-
-
-public final class XMLParserOpenJDK {
- public static void main(String[] args) throws Exception {
- String validationType = args[0];
- File schema = new File(args[1]);
- String file = args[2];
- if (validationType.equals("OpenJDK-XSD-SAX")) {
- validateXSDSAX(schema, file);
- } else if (validationType.equals("OpenJDK-RNG-SAX")) {
- validateSAX(XMLConstants.RELAXNG_NS_URI, schema, file);
- } else if (validationType.equals("OpenJDK-DTD-SAX")) {
- validateSAX(XMLConstants.XML_DTD_NS_URI, schema, file);
- } else if (validationType.equals("OpenJDK-XSD-DOM")) {
- validateXSDDOM(schema, file);
- } else if (validationType.equals("OpenJDK-RNG-DOM")) {
- validateDOM(XMLConstants.W3C_XML_SCHEMA_NS_URI,
- schema, file, false);
- } else if (validationType.equals("OpenJDK-DTD-DOM")) {
- validateDOM(XMLConstants.XML_DTD_NS_URI, schema, file, false);
- } else if (validationType.equals("OpenJDK-XSD-DOM-Validate")) {
- validateDOM(XMLConstants.W3C_XML_SCHEMA_NS_URI,
- schema, file, true);
- } else if (validationType.equals("OpenJDK-RNG-DOM-Validate")) {
- validateDOM(XMLConstants.W3C_XML_SCHEMA_NS_URI,
- schema, file, true);
- } else if (validationType.equals("OpenJDK-DTD-DOM-Validate")) {
- validateDOM(XMLConstants.XML_DTD_NS_URI, schema, file, true);
- } else if (validationType.equals("OpenJDK-SAX")) {
- parseSAX(file, false);
- } else if (validationType.equals("OpenJDK-DOM")) {
- parseDOM(file, false);
- } else if (validationType.equals("OpenJDK-SAX-Validate")) {
- parseSAX(file, true);
- } else if (validationType.equals("OpenJDK-DOM-Validate")) {
- parseDOM(file, true);
- } else {
- throw new Exception("invalid validator: " + validationType);
- }
- }
-
- static
- //+ Tasks Serialization-XML-OpenJDK-NoResourceResolver
- class NoResourceResolver implements LSResourceResolver {
- @Override
- public LSInput resolveResource(String type, String namespaceURI,
- String publicId, String systemId, String baseURI) {
- // Throwing an exception stops validation.
- throw new RuntimeException(String.format(
- "resolution attempt: type=%s namespace=%s " +
- "publicId=%s systemId=%s baseURI=%s",
- type, namespaceURI, publicId, systemId, baseURI));
- }
- }
- //-
-
- private static void validateXSDSAX( File schemaFile, String file)
- throws Exception {
- FileInputStream inputStream = new FileInputStream(file);
- try {
- //+ Tasks Serialization-XML-OpenJDK_Parse-XMLSchema_SAX
- SchemaFactory factory = SchemaFactory.newInstance(
- XMLConstants.W3C_XML_SCHEMA_NS_URI);
-
- // This enables restrictions on the schema and document
- // complexity.
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-
- // This prevents resource resolution by the schema itself.
- // If the schema is trusted and references additional files,
- // this line must be omitted, otherwise loading these files
- // will fail.
- factory.setResourceResolver(new NoResourceResolver());
-
- Schema schema = factory.newSchema(schemaFile);
- Validator validator = schema.newValidator();
-
- // This prevents external resource resolution.
- validator.setResourceResolver(new NoResourceResolver());
-
- validator.validate(new SAXSource(new InputSource(inputStream)));
- //-
- } finally {
- inputStream.close();
- }
- }
-
- /**
- * Same as {@link #validateXSDSAX(File, String)}, but the schema type URI
- * is not hard-coded.
- */
- private static void validateSAX(String uri, File schemaFile, String file)
- throws Exception {
- FileInputStream inputStream = new FileInputStream(file);
- try {
- SchemaFactory factory = SchemaFactory.newInstance(uri);
-
- // This enables restrictions on the schema and document
- // complexity.
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-
- // This prevents resource resolution by the schema itself.
- // If the schema is trusted and references additional files,
- // this line must be omitted, otherwise loading these files
- // will fail.
- factory.setResourceResolver(new NoResourceResolver());
-
- Schema schema = factory.newSchema(schemaFile);
- Validator validator = schema.newValidator();
-
- // This prevents external resource resolution.
- validator.setResourceResolver(new NoResourceResolver());
-
- validator.validate(new SAXSource(new InputSource(inputStream)));
- } finally {
- inputStream.close();
- }
- }
-
- private static void validateXSDDOM(File schemaFile, String file) throws Exception {
- FileInputStream inputStream = new FileInputStream(file);
- try {
- Document document = parseDOM(file, false);
-
- //+ Tasks Serialization-XML-OpenJDK_Parse-XMLSchema_DOM
- SchemaFactory factory = SchemaFactory.newInstance(
- XMLConstants.W3C_XML_SCHEMA_NS_URI);
-
- // This enables restrictions on schema complexity.
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-
- // The following line prevents resource resolution
- // by the schema itself.
- factory.setResourceResolver(new NoResourceResolver());
-
- Schema schema = factory.newSchema(schemaFile);
-
- Validator validator = schema.newValidator();
-
- // This prevents external resource resolution.
- validator.setResourceResolver(new NoResourceResolver());
- validator.validate(new DOMSource(document));
- //-
- } finally {
- inputStream.close();
- }
- }
-
- /**
- * Same as {@link #validateXSDDOM(File, String)}, but does not hard-code
- * the schema type URI.
- */
- private static void validateDOM(String uri, File schemaFile, String file,
- boolean validate) throws Exception {
- FileInputStream inputStream = new FileInputStream(file);
- try {
- Document document = parseDOM(file, validate);
-
- SchemaFactory factory = SchemaFactory.newInstance(uri);
-
- // This enables restrictions on schema complexity.
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-
- // The following line prevents resource resolution
- // by the schema itself.
- factory.setResourceResolver(new NoResourceResolver());
-
- Schema schema = factory.newSchema(schemaFile);
-
- Validator validator = schema.newValidator();
- // This prevents external resource resolution.
- validator.setResourceResolver(new NoResourceResolver());
- validator.validate(new DOMSource(document));
- } finally {
- inputStream.close();
- }
- }
-
- static
- //+ Tasks Serialization-XML-OpenJDK-Errors
- class Errors implements ErrorHandler {
- @Override
- public void warning(SAXParseException exception) {
- exception.printStackTrace();
- }
-
- @Override
- public void fatalError(SAXParseException exception) {
- exception.printStackTrace();
- }
-
- @Override
- public void error(SAXParseException exception) {
- exception.printStackTrace();
- }
- }
- //-
-
- static
- //+ Tasks Serialization-XML-OpenJDK-NoEntityResolver
- class NoEntityResolver implements EntityResolver {
- @Override
- public InputSource resolveEntity(String publicId, String systemId)
- throws SAXException, IOException {
- // Throwing an exception stops validation.
- throw new IOException(String.format(
- "attempt to resolve \"%s\" \"%s\"",
publicId, systemId));
- }
- }
- //-
-
- private static void parseSAX(String file, boolean validate)
- throws Exception {
- SAXParserFactory factory = SAXParserFactory.newInstance();
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
- if (validate) {
- factory.setValidating(true);
- }
- SAXParser parser = factory.newSAXParser();
- FileInputStream in = new FileInputStream(file);
- try {
- XMLReader reader = parser.getXMLReader();
- reader.setEntityResolver(new NoEntityResolver());
- reader.setErrorHandler(new Errors());
- reader.parse(new InputSource(in));
- } finally {
- in.close();
- }
- }
-
- private static Document parseDOM(String file, boolean validate)
- throws Exception {
- FileInputStream inputStream = new FileInputStream(file);
- try {
- return parseDOMInternal(inputStream);
- } finally {
- inputStream.close();
- }
- }
-
- private static Document parseDOMInternal(FileInputStream inputStream)
- throws ParserConfigurationException, SAXException, IOException {
- //+ Tasks Serialization-XML-OpenJDK_Parse-DOM
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- // Impose restrictions on the complexity of the DTD.
- factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-
- // Turn on validation.
- // This step can be omitted if validation is not desired.
- factory.setValidating(true);
-
- // Parse the document.
- DocumentBuilder builder = factory.newDocumentBuilder();
- builder.setEntityResolver(new NoEntityResolver());
- builder.setErrorHandler(new Errors());
- Document document = builder.parse(inputStream);
- //-
- return document;
- }
-}
diff --git a/defensive-coding/src/.svn/text-base/check-function.py.svn-base
b/defensive-coding/src/.svn/text-base/check-function.py.svn-base
deleted file mode 100644
index ee647d6..0000000
--- a/defensive-coding/src/.svn/text-base/check-function.py.svn-base
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/python
-
-# Usage: python check-function.py DSO/FUNCTION-NAME/OUTPUT
-#
-# Prints OUTPUT if libDSO.so can be loaded and defines FUNCTION-NAME
-# as a function, or nothing otherwise.
-
-import ctypes
-import sys
-
-for (dsoname, funcname, output) in [arg.split("/", 3)
- for arg in sys.argv[1:]]:
- try:
- dso = ctypes.CDLL("lib{0}.so".format(dsoname))
- except OSError:
- continue
- if getattr(dso, funcname, None) is not None:
- print output
diff --git a/defensive-coding/src/.svn/text-base/src.mk.svn-base
b/defensive-coding/src/.svn/text-base/src.mk.svn-base
deleted file mode 100644
index 7987680..0000000
--- a/defensive-coding/src/.svn/text-base/src.mk.svn-base
+++ /dev/null
@@ -1,53 +0,0 @@
-.PHONY: build-sources
-
-CC = gcc
-CWARNFLAGS = -Wall -W -Wno-unused-parameter -Werror=implicit-function-declaration
-CFLAGS = -std=gnu99 -O2 $(CWARNFLAGS) -g
-
-# List files which should only be compiled for syntax checking.
-compile_only += C-Pointers-remaining
-compile_only += C-Arithmetic-add
-compile_only += C-Arithmetic-mult
-
-# List Java files which sould be compiled
-compile_java += TLSClientOpenJDK
-
-# List fiels which will be compiled and linked, together with
-# additional dependencies.
-compile_and_link += C-String-Functions
-compile_and_link += TLS-Client-OpenSSL
-LIBS_TLS-Client-OpenSSL = -lssl -lcrypto
-compile_and_link += TLS-Client-GNUTLS
-LIBS_TLS-Client-GNUTLS = -lgnutls
-compile_and_link += TLS-Client-NSS
-CFLAGS_TLS-Client-NSS = -I/usr/include/nspr4 -I/usr/include/nss3
-LIBS_TLS-Client-NSS = -lnss3 -lnspr4 -lssl3
-compile_and_link += XML-Parser-Expat
-LIBS_XML-Parser-Expat = -lexpat
-
-# Define preprocessor symbols if certain functions exist.
-CHECK_FUNCTION = crypto/X509_check_host/-DHAVE_X509_CHECK_HOST \
- gnutls/gnutls_hash_fast/-DHAVE_GNUTLS_HASH_FAST
-DEFINES := $(shell python src/check-function.py $(CHECK_FUNCTION))
-
-CLASS_compile_java := $(patsubst %,src/%.class,$(compile_java))
-BIN_compile_and_link := $(patsubst %,src/%,$(compile_and_link))
-
-build-src: $(patsubst %,src/%.o,$(compile_only)) $(CLASS_compile_java) \
- $(BIN_compile_and_link)
-
-clean-src:
- -rm src/*.o src/*.class $(BIN_compile_and_link)
-
-src/%.o: src/%.c
- $(CC) $(CFLAGS) $(DEFINES) $(CFLAGS_$(basename $(notdir $@))) -c $< -o $@
-
-src/%.class: src/%.java
- javac -source 1.6 -target 1.6 -Xlint:all $^
-
-src/%: src/%.o
- $(CC) $^ -o $@ $(LIBS_$(notdir $@))
-
-src/TLS-Client-GNUTLS: src/tcp_connect.o
-src/TLS-Client-OpenSSL: src/tcp_connect.o src/x509_check_host.o
-src/TLS-Client-NSS: src/tcp_connect.o
diff --git a/defensive-coding/src/.svn/text-base/tcp_connect.c.svn-base
b/defensive-coding/src/.svn/text-base/tcp_connect.c.svn-base
deleted file mode 100644
index fe72b31..0000000
--- a/defensive-coding/src/.svn/text-base/tcp_connect.c.svn-base
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "tcp_connect.h"
-
-#include <errno.h>
-#include <netdb.h>
-#include <netinet/tcp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-
-int
-tcp_connect(const char *host, const char *service)
-{
- // A real-world implementation should connect to one IPv4 and one
- // IPv address in parallel, until a responsive server is found.
- const struct addrinfo hints = {
- .ai_family = AF_UNSPEC,
- .ai_socktype = SOCK_STREAM,
- };
- struct addrinfo *result;
- int ret = getaddrinfo(host, service, &hints, &result);
- if (ret != 0) {
- fprintf(stderr, "error: name lookup failure for %s/%s: %s\n",
- host, service, gai_strerror(ret));
- exit(1);
- }
- if (result == NULL) {
- fprintf(stderr, "error: no addresses found for %s/%s\n", host, service);
- freeaddrinfo(result);
- return -1;
- }
- for (const struct addrinfo *ai = result; ai; ai = ai->ai_next) {
- ret = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
- if (ret < 0) {
- continue;
- }
- if (connect(ret, ai->ai_addr, ai->ai_addrlen) == 0) {
- break;
- }
- int save = errno;
- close(ret);
- errno = save;
- ret = -1;
- }
- if (ret < 0) {
- return -1;
- }
- freeaddrinfo(result);
- return ret;
-}
diff --git a/defensive-coding/src/.svn/text-base/tcp_connect.h.svn-base
b/defensive-coding/src/.svn/text-base/tcp_connect.h.svn-base
deleted file mode 100644
index 0234999..0000000
--- a/defensive-coding/src/.svn/text-base/tcp_connect.h.svn-base
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-/* Establishes a TCP connect to SERVICE at HOST and returns the socket
- descriptor. Calls exit on error (and prints an error message). */
-int tcp_connect(const char *host, const char *service);
-
diff --git a/defensive-coding/src/.svn/text-base/x509_check_host.c.svn-base
b/defensive-coding/src/.svn/text-base/x509_check_host.c.svn-base
deleted file mode 100644
index 9797b56..0000000
--- a/defensive-coding/src/.svn/text-base/x509_check_host.c.svn-base
+++ /dev/null
@@ -1,355 +0,0 @@
-// This file is based on a (currently patched) file from OpenSSL,
-// namely crypto/x509v3/v3_utl.c. It is included here for testing
-// purposes only.
-
-/* v3_utl.c */
-/* Written by Dr Stephen N Henson (steve(a)openssl.org) for the OpenSSL
- * project.
- */
-/* ====================================================================
- * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (
http://www.OpenSSL.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be
used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * licensing(a)OpenSSL.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (
http://www.OpenSSL.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay(a)cryptsoft.com). This product includes software written by Tim
- * Hudson (tjh(a)cryptsoft.com).
- *
- */
-
-#ifndef HAVE_X509_CHECK_HOST
-
-#include <string.h>
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
-
-/* Always check subject name for host match even if subject alt names present */
-#define X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT 0x1
-/* Disable wild-card matching for dnsName fields and common name. */
-#define X509_CHECK_FLAG_NO_WILDCARDS 0x2
-
-typedef int (*equal_fn)(const unsigned char *pattern, size_t pattern_len,
- const unsigned char *subject, size_t subject_len);
-
-/* Compare while ASCII ignoring case. */
-static int equal_nocase(const unsigned char *pattern, size_t pattern_len,
- const unsigned char *subject, size_t subject_len)
- {
- if (pattern_len != subject_len)
- return 0;
- while (pattern_len)
- {
- unsigned char l = *pattern;
- unsigned char r = *subject;
- /* The pattern must not contain NUL characters. */
- if (l == 0)
- return 0;
- if (l != r)
- {
- if ('A' <= l && l <= 'Z')
- l = (l - 'A') + 'a';
- if ('A' <= r && r <= 'Z')
- r = (r - 'A') + 'a';
- if (l != r)
- return 0;
- }
- ++pattern;
- ++subject;
- --pattern_len;
- }
- return 1;
- }
-
-/* Compare using memcmp. */
-static int equal_case(const unsigned char *pattern, size_t pattern_len,
- const unsigned char *subject, size_t subject_len)
-{
- /* The pattern must not contain NUL characters. */
- if (memchr(pattern, '\0', pattern_len) != NULL)
- return 0;
- if (pattern_len != subject_len)
- return 0;
- return !memcmp(pattern, subject, pattern_len);
-}
-
-/* RFC 5280, section 7.5, requires that only the domain is compared in
- a case-insensitive manner. */
-static int equal_email(const unsigned char *a, size_t a_len,
- const unsigned char *b, size_t b_len)
- {
- if (a_len != b_len)
- return 0;
- size_t i = a_len;
- /* We search backwards for the '@' character, so that we do
- not have to deal with quoted local-parts. The domain part
- is compared in a case-insensitive manner. */
- while (i > 0)
- {
- --i;
- if (a[i] == '@' || b[i] == '@')
- {
- if (!equal_nocase(a + i, a_len - i,
- b + i, a_len - i))
- return 0;
- break;
- }
- }
- if (i == 0)
- i = a_len;
- return equal_case(a, i, b, i);
- }
-
-/* Compare the prefix and suffix with the subject, and check that the
- characters in-between are valid. */
-static int wildcard_match(const unsigned char *prefix, size_t prefix_len,
- const unsigned char *suffix, size_t suffix_len,
- const unsigned char *subject, size_t subject_len)
- {
- const unsigned char *wildcard_start;
- const unsigned char *wildcard_end;
- const unsigned char *p;
- if (subject_len < prefix_len + suffix_len)
- return 0;
- if (!equal_nocase(prefix, prefix_len, subject, prefix_len))
- return 0;
- wildcard_start = subject + prefix_len;
- wildcard_end = subject + (subject_len - suffix_len);
- if (!equal_nocase(wildcard_end, suffix_len, suffix, suffix_len))
- return 0;
- /* The wildcard must match at least one character. */
- if (wildcard_start == wildcard_end)
- return 0;
- /* Check that the part matched by the wildcard contains only
- permitted characters and only matches a single label. */
- for (p = wildcard_start; p != wildcard_end; ++p)
- if (!(('0' <= *p && *p <= '9') ||
- ('A' <= *p && *p <= 'Z') ||
- ('a' <= *p && *p <= 'z') ||
- *p == '-'))
- return 0;
- return 1;
- }
-
-/* Checks if the memory region consistens of [0-9A-Za-z.-]. */
-static int valid_domain_characters(const unsigned char *p, size_t len)
- {
- while (len)
- {
- if (!(('0' <= *p && *p <= '9') ||
- ('A' <= *p && *p <= 'Z') ||
- ('a' <= *p && *p <= 'z') ||
- *p == '-' || *p == '.'))
- return 0;
- ++p;
- --len;
- }
- return 1;
- }
-
-/* Find the '*' in a wildcard pattern. If no such character is found
- or the pattern is otherwise invalid, returns NULL. */
-static const unsigned char *wildcard_find_star(const unsigned char *pattern,
- size_t pattern_len)
- {
- const unsigned char *star = memchr(pattern, '*', pattern_len);
- size_t dot_count = 0;
- const unsigned char *suffix_start;
- size_t suffix_length;
- if (star == NULL)
- return NULL;
- suffix_start = star + 1;
- suffix_length = (pattern + pattern_len) - (star + 1);
- if (!(valid_domain_characters(pattern, star - pattern) &&
- valid_domain_characters(suffix_start, suffix_length)))
- return NULL;
- /* Check that the suffix matches at least two labels. */
- while (suffix_length)
- {
- if (*suffix_start == '.')
- ++dot_count;
- ++suffix_start;
- --suffix_length;
- }
- if (dot_count < 2)
- return NULL;
- return star;
- }
-
-/* Compare using wildcards. */
-static int equal_wildcard(const unsigned char *pattern, size_t pattern_len,
- const unsigned char *subject, size_t subject_len)
- {
- const unsigned char *star;
- /* Do not match IDNA names. */
- if (subject_len >=4 && memcmp(subject, "xn--", 4) == 0)
- star = NULL;
- else
- star = wildcard_find_star(pattern, pattern_len);
- if (star == NULL)
- return equal_nocase(pattern, pattern_len,
- subject, subject_len);
- return wildcard_match(pattern, star - pattern,
- star + 1, (pattern + pattern_len) - star - 1,
- subject, subject_len);
- }
-
-/* Compare an ASN1_STRING to a supplied string. If they match
- * return 1. If cmp_type > 0 only compare if string matches the
- * type, otherwise convert it to UTF8.
- */
-
-static int do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
- const unsigned char *b, size_t blen)
- {
- if (!a->data || !a->length)
- return 0;
- if (cmp_type > 0)
- {
- if (cmp_type != a->type)
- return 0;
- if (cmp_type == V_ASN1_IA5STRING)
- return equal(a->data, a->length, b, blen);
- if (a->length == (int)blen && !memcmp(a->data, b, blen))
- return 1;
- else
- return 0;
- }
- else
- {
- int astrlen, rv;
- unsigned char *astr;
- astrlen = ASN1_STRING_to_UTF8(&astr, a);
- if (astrlen < 0)
- return 0;
- rv = equal(astr, astrlen, b, blen);
- OPENSSL_free(astr);
- return rv;
- }
- }
-
-static int do_x509_check(X509 *x, const unsigned char *chk, size_t chklen,
- unsigned int flags, int check_type)
- {
- GENERAL_NAMES *gens = NULL;
- X509_NAME *name = NULL;
- int i;
- int cnid;
- int alt_type;
- equal_fn equal;
- if (check_type == GEN_EMAIL)
- {
- cnid = NID_pkcs9_emailAddress;
- alt_type = V_ASN1_IA5STRING;
- equal = equal_email;
- }
- else if (check_type == GEN_DNS)
- {
- cnid = NID_commonName;
- alt_type = V_ASN1_IA5STRING;
- if (flags & X509_CHECK_FLAG_NO_WILDCARDS)
- equal = equal_nocase;
- else
- equal = equal_wildcard;
- }
- else
- {
- cnid = 0;
- alt_type = V_ASN1_OCTET_STRING;
- equal = equal_case;
- }
-
- if (chklen == 0)
- chklen = strlen((const char *)chk);
-
- gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL);
- if (gens)
- {
- int rv = 0;
- for (i = 0; i < sk_GENERAL_NAME_num(gens); i++)
- {
- GENERAL_NAME *gen;
- ASN1_STRING *cstr;
- gen = sk_GENERAL_NAME_value(gens, i);
- if(gen->type != check_type)
- continue;
- if (check_type == GEN_EMAIL)
- cstr = gen->d.rfc822Name;
- else if (check_type == GEN_DNS)
- cstr = gen->d.dNSName;
- else
- cstr = gen->d.iPAddress;
- if (do_check_string(cstr, alt_type, equal, chk, chklen))
- {
- rv = 1;
- break;
- }
- }
- GENERAL_NAMES_free(gens);
- if (rv)
- return 1;
- if (!(flags & X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT) || !cnid)
- return 0;
- }
- i = -1;
- name = X509_get_subject_name(x);
- while((i = X509_NAME_get_index_by_NID(name, cnid, i)) >= 0)
- {
- X509_NAME_ENTRY *ne;
- ASN1_STRING *str;
- ne = X509_NAME_get_entry(name, i);
- str = X509_NAME_ENTRY_get_data(ne);
- if (do_check_string(str, -1, equal, chk, chklen))
- return 1;
- }
- return 0;
- }
-
-int X509_check_host(X509 *x, const unsigned char *chk, size_t chklen,
- unsigned int flags)
- {
- return do_x509_check(x, chk, chklen, flags, GEN_DNS);
- }
-#endif
diff --git a/defensive-coding/src/data/.svn/all-wcprops
b/defensive-coding/src/data/.svn/all-wcprops
deleted file mode 100644
index ae22847..0000000
--- a/defensive-coding/src/data/.svn/all-wcprops
+++ /dev/null
@@ -1,197 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 68
-/repos/product-security/!svn/ver/290/defensive-coding/trunk/src/data
-END
-XML-Parser-DTD_Public_URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 98
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-DTD_Public_URL.xml
-END
-XML-Parser-Internal_Entity_Polynomial_Attribute.xml
-K 25
-svn:wc:ra_dav:version-url
-V 120
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Internal_Entity_Polynomial_Attribute.xml
-END
-XML-Parser-Notation_System.xml
-K 25
-svn:wc:ra_dav:version-url
-V 99
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Notation_System.xml
-END
-XML-Parser-Internal_Entity_Exponential_Attribute.xml
-K 25
-svn:wc:ra_dav:version-url
-V 121
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Internal_Entity_Exponential_Attribute.xml
-END
-XML-Parser-External_Entity_System_URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 110
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-External_Entity_System_URL.xml
-END
-XML-Parser-Internal_Regexp_1.xml
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Internal_Regexp_1.xml
-END
-XML-Parser-Internal_Regexp_2.xml
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Internal_Regexp_2.xml
-END
-XML-Parser-Internal_Regexp_3.xml
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Internal_Regexp_3.xml
-END
-XML-Parser-DTD_Public.xml
-K 25
-svn:wc:ra_dav:version-url
-V 94
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-DTD_Public.xml
-END
-XML-Parser-Notation_Public_URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 103
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Notation_Public_URL.xml
-END
-XML-Parser-Internal_Entity_Polynomial.xml
-K 25
-svn:wc:ra_dav:version-url
-V 110
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Internal_Entity_Polynomial.xml
-END
-XML-Parser-XSD-Include_File.xml
-K 25
-svn:wc:ra_dav:version-url
-V 100
-/repos/product-security/!svn/ver/284/defensive-coding/trunk/src/data/XML-Parser-XSD-Include_File.xml
-END
-XML-Parser-External_Regexp_3.xml
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-External_Regexp_3.xml
-END
-XML-Parser-Internal_Entity_Exponential.xml
-K 25
-svn:wc:ra_dav:version-url
-V 111
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Internal_Entity_Exponential.xml
-END
-XML-Parser-External_Entity_System.xml
-K 25
-svn:wc:ra_dav:version-url
-V 106
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-External_Entity_System.xml
-END
-XML-Parser-XInclude-File.xml
-K 25
-svn:wc:ra_dav:version-url
-V 97
-/repos/product-security/!svn/ver/290/defensive-coding/trunk/src/data/XML-Parser-XInclude-File.xml
-END
-XML-Parser-External_Regexp_3.dtd
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/279/defensive-coding/trunk/src/data/XML-Parser-External_Regexp_3.dtd
-END
-XML-Parser-Notation_Public.xml
-K 25
-svn:wc:ra_dav:version-url
-V 99
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Notation_Public.xml
-END
-XML-Parser-External_Entity_Public_URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 110
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-External_Entity_Public_URL.xml
-END
-XML-Parser-XSD-URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 91
-/repos/product-security/!svn/ver/284/defensive-coding/trunk/src/data/XML-Parser-XSD-URL.xml
-END
-XML-Parser-Validate-Regexp_1.xsd
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/283/defensive-coding/trunk/src/data/XML-Parser-Validate-Regexp_1.xsd
-END
-XML-Parser-DTD_System_URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 98
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-DTD_System_URL.xml
-END
-XML-Parser-Validate-Regexp_1.xml
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/282/defensive-coding/trunk/src/data/XML-Parser-Validate-Regexp_1.xml
-END
-XML-Parser-XSD-Include_URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 99
-/repos/product-security/!svn/ver/284/defensive-coding/trunk/src/data/XML-Parser-XSD-Include_URL.xml
-END
-XML-Parser-Validate-Regexp_4.xsd
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/283/defensive-coding/trunk/src/data/XML-Parser-Validate-Regexp_4.xsd
-END
-XML-Parser-XInclude-URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 96
-/repos/product-security/!svn/ver/290/defensive-coding/trunk/src/data/XML-Parser-XInclude-URL.xml
-END
-XML-Parser-XSD-File.xml
-K 25
-svn:wc:ra_dav:version-url
-V 92
-/repos/product-security/!svn/ver/284/defensive-coding/trunk/src/data/XML-Parser-XSD-File.xml
-END
-XML-Parser-External_Entity_Public.xml
-K 25
-svn:wc:ra_dav:version-url
-V 106
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-External_Entity_Public.xml
-END
-XML-Parser-Validate-Regexp_1.dtd
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/282/defensive-coding/trunk/src/data/XML-Parser-Validate-Regexp_1.dtd
-END
-XML-Parser-DTD_System.xml
-K 25
-svn:wc:ra_dav:version-url
-V 94
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-DTD_System.xml
-END
-XML-Parser-Notation_System_URL.xml
-K 25
-svn:wc:ra_dav:version-url
-V 103
-/repos/product-security/!svn/ver/281/defensive-coding/trunk/src/data/XML-Parser-Notation_System_URL.xml
-END
-XML-Parser-Validate-Regexp_1.rng
-K 25
-svn:wc:ra_dav:version-url
-V 101
-/repos/product-security/!svn/ver/283/defensive-coding/trunk/src/data/XML-Parser-Validate-Regexp_1.rng
-END
diff --git a/defensive-coding/src/data/.svn/entries
b/defensive-coding/src/data/.svn/entries
deleted file mode 100644
index a6441d2..0000000
--- a/defensive-coding/src/data/.svn/entries
+++ /dev/null
@@ -1,1116 +0,0 @@
-10
-
-dir
-305
-https://svn.devel.redhat.com/repos/product-security/defensive-coding/trunk/src/data
-https://svn.devel.redhat.com/repos/product-security
-
-
-
-2012-12-14T09:56:46.394074Z
-290
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-9bd5cf0f-f2b3-0410-b1a9-d5c590f50bf1
-
-XML-Parser-DTD_Public_URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.229827Z
-869b431ed9e7f200340094d1d79e38f2
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-142
-
-XML-Parser-Internal_Entity_Polynomial_Attribute.xml
-file
-
-
-
-
-2013-01-10T17:17:51.230827Z
-1a3b26c00352413667f38df1e0533238
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-687
-
-XML-Parser-Notation_System.xml
-file
-
-
-
-
-2013-01-10T17:17:51.230827Z
-889faad5991dae5ecea3ee591a867053
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-226
-
-XML-Parser-Internal_Entity_Exponential_Attribute.xml
-file
-
-
-
-
-2013-01-10T17:17:51.231827Z
-f5a857fa435e11d8e88cc63bfc8bba2b
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-991
-
-XML-Parser-External_Entity_System_URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.231827Z
-ae97ab4d247363e5d94ab2b13af3c99f
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-202
-
-XML-Parser-Internal_Regexp_1.xml
-file
-
-
-
-
-2013-01-10T17:17:51.232827Z
-dd38cd30bd5af1a813ef115c8a326525
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1968
-
-XML-Parser-Internal_Regexp_2.xml
-file
-
-
-
-
-2013-01-10T17:17:51.232827Z
-b83ec2586401b78a9ef21e488d97ee47
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1040
-
-XML-Parser-Internal_Regexp_3.xml
-file
-
-
-
-
-2013-01-10T17:17:51.233827Z
-e4749f47ced3a7bdd949b10382c337f0
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-928
-
-XML-Parser-DTD_Public.xml
-file
-
-
-
-
-2013-01-10T17:17:51.233827Z
-35da8117213594909cd8d375cb787e2e
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-139
-
-XML-Parser-Notation_Public_URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.234827Z
-82b5df6efa8704b0bb6a35c491329f0e
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-242
-
-XML-Parser-Internal_Entity_Polynomial.xml
-file
-
-
-
-
-2013-01-10T17:17:51.235827Z
-985019512466a10d9ee9bc76bc2ecd26
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-658
-
-XML-Parser-XSD-Include_File.xml
-file
-
-
-
-
-2013-01-10T17:17:51.235827Z
-e6d2f280e2d079b5f7286d00e1b29e0d
-2012-12-13T16:18:36.596123Z
-284
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-562
-
-XML-Parser-External_Regexp_3.xml
-file
-
-
-
-
-2013-01-10T17:17:51.236827Z
-55df86c4cb70b6324f31061a40f9b1f9
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-214
-
-XML-Parser-Internal_Entity_Exponential.xml
-file
-
-
-
-
-2013-01-10T17:17:51.236827Z
-5af629a3428064cd3ae7c251607b8b75
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-963
-
-XML-Parser-External_Entity_System.xml
-file
-
-
-
-
-2013-01-10T17:17:51.236827Z
-da6e3b3d71fbe30b6fc9f0bd937f5564
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-191
-
-XML-Parser-XInclude-File.xml
-file
-
-
-
-
-2013-01-10T17:17:51.237827Z
-074294be6fbc0885ab50385d5369350c
-2012-12-14T09:56:46.394074Z
-290
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-124
-
-XML-Parser-External_Regexp_3.dtd
-file
-
-
-
-
-2013-01-10T17:17:51.237827Z
-6e9f960ae6fae80f2f1af9d15bee4e7d
-2012-12-11T17:20:43.846695Z
-279
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-741
-
-XML-Parser-Notation_Public.xml
-file
-
-
-
-
-2013-01-10T17:17:51.237827Z
-c2d44d02ed8817af336fd79b3807d7dc
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-234
-
-XML-Parser-External_Entity_Public_URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.237827Z
-347a775c3109f69ec8fa7f6d62f821d2
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-205
-
-XML-Parser-XSD-URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.237827Z
-5ecbfe43ff2987ae98fccf42d344c346
-2012-12-13T16:18:36.596123Z
-284
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-209
-
-XML-Parser-Validate-Regexp_1.xsd
-file
-
-
-
-
-2013-01-10T17:17:51.238827Z
-4520a3678005156cd43141d5263e60e5
-2012-12-13T14:47:55.060580Z
-283
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-29478
-
-XML-Parser-DTD_System_URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.238827Z
-7c427b73646ce262d458240da1b9a186
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-132
-
-XML-Parser-Validate-Regexp_1.xml
-file
-
-
-
-
-2013-01-10T17:17:51.238827Z
-019cd575cac5678e40f20d7baa4047d1
-2012-12-13T14:46:38.504321Z
-282
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-232
-
-XML-Parser-XSD-Include_URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.238827Z
-1ef30f90e596d729a28c7828883ea82b
-2012-12-13T16:18:36.596123Z
-284
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-577
-
-XML-Parser-Validate-Regexp_4.xsd
-file
-
-
-
-
-2013-01-10T17:17:51.238827Z
-e786c676475116dd14cc5196761a1f1b
-2012-12-13T14:47:55.060580Z
-283
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1074
-
-XML-Parser-XInclude-URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.239827Z
-9c27dd5bc74aef33c090b6e8fc8b9529
-2012-12-14T09:56:46.394074Z
-290
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-143
-
-XML-Parser-XSD-File.xml
-file
-
-
-
-
-2013-01-10T17:17:51.238827Z
-2a9ca74fe9cabead7f49d4d542d98def
-2012-12-13T16:18:36.596123Z
-284
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-194
-
-XML-Parser-External_Entity_Public.xml
-file
-
-
-
-
-2013-01-10T17:17:51.239827Z
-fb902fb338961c2664409f8515850fcb
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-199
-
-XML-Parser-Validate-Regexp_1.dtd
-file
-
-
-
-
-2013-01-10T17:17:51.239827Z
-ced5e4ccad136727cefc561fb51facb8
-2012-12-13T14:46:38.504321Z
-282
-fweimer(a)REDHAT.COM
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1594
-
-XML-Parser-DTD_System.xml
-file
-
-
-
-
-2013-01-10T17:17:51.239827Z
-7bd4d6b9ce1a7dd1bc519c69e0b06e22
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-129
-
-XML-Parser-Notation_System_URL.xml
-file
-
-
-
-
-2013-01-10T17:17:51.239827Z
-798501c7c170ba483afc44a52be06c0d
-2012-12-13T13:25:23.103424Z
-281
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-234
-
-XML-Parser-Validate-Regexp_1.rng
-file
-
-
-
-
-2013-01-10T17:17:51.239827Z
-249193cd5d0356d8c0a6a578b05da265
-2012-12-13T14:47:55.060580Z
-283
-fweimer(a)REDHAT.COM
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-23524
-
diff --git a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_Public.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_Public.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_Public.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_Public_URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_Public_URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_Public_URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_System.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_System.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_System.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_System_URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_System_URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-DTD_System_URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_Public.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_Public.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_Public.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_Public_URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_Public_URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_Public_URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_System.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_System.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_System.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_System_URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_System_URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Entity_System_URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Regexp_3.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Regexp_3.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-External_Regexp_3.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Exponential.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Exponential.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Exponential.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Exponential_Attribute.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Exponential_Attribute.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Exponential_Attribute.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Polynomial.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Polynomial.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Polynomial.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Polynomial_Attribute.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Polynomial_Attribute.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Entity_Polynomial_Attribute.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_1.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_1.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_1.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_2.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_2.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_2.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_3.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_3.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Internal_Regexp_3.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_Public.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_Public.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_Public.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_Public_URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_Public_URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_Public_URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_System.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_System.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_System.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_System_URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_System_URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
---
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Notation_System_URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.rng.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.rng.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.rng.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.xsd.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.xsd.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_1.xsd.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_4.xsd.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_4.xsd.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-Validate-Regexp_4.xsd.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XInclude-File.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-XInclude-File.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XInclude-File.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XInclude-URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-XInclude-URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XInclude-URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-File.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-File.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-File.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-Include_File.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-Include_File.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-Include_File.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git
a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-Include_URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-Include_URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-Include_URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-URL.xml.svn-base
b/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-URL.xml.svn-base
deleted file mode 100644
index bfec7d5..0000000
--- a/defensive-coding/src/data/.svn/prop-base/XML-Parser-XSD-URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 8
-text/xml
-END
diff --git a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_Public.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_Public.xml.svn-base
deleted file mode 100644
index 1904358..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_Public.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external DTD (PUBLIC) -->
-<!DOCTYPE root PUBLIC "-//DTD1" "./XML-Parser-Referenced.xml">
-<root>&e1;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_Public_URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_Public_URL.xml.svn-base
deleted file mode 100644
index 593d191..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_Public_URL.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external DTD (PUBLIC URL) -->
-<!DOCTYPE root PUBLIC "-//DTD1" "http://www.example.com/dtd">
-<root>&e1;</root>
diff --git a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_System.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_System.xml.svn-base
deleted file mode 100644
index 5d809c9..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_System.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external DTD (SYSTEM) -->
-<!DOCTYPE root SYSTEM "./XML-Parser-Referenced.xml">
-<root>&e1;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_System_URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_System_URL.xml.svn-base
deleted file mode 100644
index c6db833..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-DTD_System_URL.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external DTD (SYSTEM URL) -->
-<!DOCTYPE root SYSTEM "http://www.example.com/dtd">
-<root>&e1;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_Public.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_Public.xml.svn-base
deleted file mode 100644
index b976d59..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_Public.xml.svn-base
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external entity reference (PUBLIC). -->
-<!DOCTYPE root [
-<!ELEMENT root (#PCDATA)>
-<!ENTITY e1 PUBLIC "-//E1" "./XML-Parser-Referenced.xml">
-]>
-<root>&e1;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_Public_URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_Public_URL.xml.svn-base
deleted file mode 100644
index d9a7552..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_Public_URL.xml.svn-base
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external entity reference (PUBLIC URL). -->
-<!DOCTYPE root [
-<!ELEMENT root (#PCDATA)>
-<!ENTITY e1 PUBLIC "-//E1" "http://www.example.com/entity">
-]>
-<root>&e1;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_System.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_System.xml.svn-base
deleted file mode 100644
index bb33a91..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_System.xml.svn-base
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external entity reference (SYSTEM). -->
-<!DOCTYPE root [
-<!ELEMENT root (#PCDATA)>
-<!ENTITY e1 SYSTEM "./XML-Parser-Referenced.xml">
-]>
-<root>&e1;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_System_URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_System_URL.xml.svn-base
deleted file mode 100644
index cc0fbe0..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Entity_System_URL.xml.svn-base
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test external entity reference (SYSTEM with URL). -->
-<!DOCTYPE root [
-<!ELEMENT root (#PCDATA)>
-<!ENTITY e1 SYSTEM "http://www.example.com/entity">
-]>
-<root>&e1;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Regexp_3.dtd.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Regexp_3.dtd.svn-base
deleted file mode 100644
index bc6d7af..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Regexp_3.dtd.svn-base
+++ /dev/null
@@ -1,11 +0,0 @@
-<!ELEMENT e0 EMPTY>
-<!ENTITY % e1 "(e0,e0)">
-<!ENTITY % e2
"(%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;)">
-<!ENTITY % e3
"(%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;)">
-<!ENTITY % e4
"(%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;)">
-<!ENTITY % e5
"(%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;)">
-<!ENTITY % e6
"(%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;)">
-<!ENTITY % e7
"(%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;)">
-<!ENTITY % e8
"(%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;)">
-<!ENTITY % e9
"(%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;)">
-<!ELEMENT root (%e9;)?>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Regexp_3.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Regexp_3.xml.svn-base
deleted file mode 100644
index 5616c7a..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-External_Regexp_3.xml.svn-base
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test non-deterministic content model matching.
-
-This should not actually pose any problems to validation.
-
--->
-<!DOCTYPE root SYSTEM "./XML-Parser-External_Regexp_3.dtd">
-<root>
-</root>
-
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Exponential.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Exponential.xml.svn-base
deleted file mode 100644
index b5a67ff..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Exponential.xml.svn-base
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test exponential growth of expanded XML.
- Expansion happens in PCDATA content. -->
-<!DOCTYPE root [
-<!ELEMENT root (#PCDATA)>
-<!ENTITY e1 "XXXXXX">
-<!ENTITY e2 "&e1;&e1;">
-<!ENTITY e3 "&e2;&e2;">
-<!ENTITY e4 "&e3;&e3;">
-<!ENTITY e5 "&e4;&e4;">
-<!ENTITY e6 "&e5;&e5;">
-<!ENTITY e7 "&e6;&e6;">
-<!ENTITY e8 "&e7;&e7;">
-<!ENTITY e9 "&e8;&e8;">
-<!ENTITY e10 "&e9;&e9;">
-<!ENTITY e11 "&e10;&e10;">
-<!ENTITY e12 "&e11;&e11;">
-<!ENTITY e13 "&e12;&e12;">
-<!ENTITY e14 "&e13;&e13;">
-<!ENTITY e15 "&e14;&e14;">
-<!ENTITY e16 "&e15;&e15;">
-<!ENTITY e17 "&e16;&e16;">
-<!ENTITY e18 "&e17;&e17;">
-<!ENTITY e19 "&e18;&e18;">
-<!ENTITY e20 "&e19;&e19;">
-<!ENTITY e21 "&e20;&e20;">
-<!ENTITY e22 "&e21;&e21;">
-<!ENTITY e23 "&e22;&e22;">
-<!ENTITY e24 "&e23;&e23;">
-<!ENTITY e25 "&e24;&e24;">
-<!ENTITY e26 "&e25;&e25;">
-<!ENTITY e27 "&e26;&e26;">
-<!ENTITY e28 "&e27;&e27;">
-<!ENTITY e29 "&e28;&e28;">
-<!ENTITY e30 "&e29;&e29;">
-]>
-<root>&e30;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Exponential_Attribute.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Exponential_Attribute.xml.svn-base
deleted file mode 100644
index 7b02965..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Exponential_Attribute.xml.svn-base
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test exponential growth of expanded XML.
- Expansion happens in an attribute. -->
-<!DOCTYPE root [
-<!ELEMENT root EMPTY>
-<!ATTLIST root id CDATA #IMPLIED>
-<!ENTITY e1 "XXXXXX">
-<!ENTITY e2 "&e1;&e1;">
-<!ENTITY e3 "&e2;&e2;">
-<!ENTITY e4 "&e3;&e3;">
-<!ENTITY e5 "&e4;&e4;">
-<!ENTITY e6 "&e5;&e5;">
-<!ENTITY e7 "&e6;&e6;">
-<!ENTITY e8 "&e7;&e7;">
-<!ENTITY e9 "&e8;&e8;">
-<!ENTITY e10 "&e9;&e9;">
-<!ENTITY e11 "&e10;&e10;">
-<!ENTITY e12 "&e11;&e11;">
-<!ENTITY e13 "&e12;&e12;">
-<!ENTITY e14 "&e13;&e13;">
-<!ENTITY e15 "&e14;&e14;">
-<!ENTITY e16 "&e15;&e15;">
-<!ENTITY e17 "&e16;&e16;">
-<!ENTITY e18 "&e17;&e17;">
-<!ENTITY e19 "&e18;&e18;">
-<!ENTITY e20 "&e19;&e19;">
-<!ENTITY e21 "&e20;&e20;">
-<!ENTITY e22 "&e21;&e21;">
-<!ENTITY e23 "&e22;&e22;">
-<!ENTITY e24 "&e23;&e23;">
-<!ENTITY e25 "&e24;&e24;">
-<!ENTITY e26 "&e25;&e25;">
-<!ENTITY e27 "&e26;&e26;">
-<!ENTITY e28 "&e27;&e27;">
-<!ENTITY e29 "&e28;&e28;">
-<!ENTITY e30 "&e29;&e29;">
-]>
-<root id="&e30;"/>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Polynomial.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Polynomial.xml.svn-base
deleted file mode 100644
index cc181a3..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Polynomial.xml.svn-base
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test polynomial growth of expanded XML.
- Expansion happens in PCDATA content. -->
-<!DOCTYPE root [
-<!ELEMENT root (#PCDATA)>
-<!ENTITY e1
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">
-<!ENTITY e2
"&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;">
-<!ENTITY e3
"&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;">
-<!ENTITY e4
"&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;">
-<!ENTITY e5
"&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;">
-<!ENTITY e6
"&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;">
-]>
-<root>&e6;</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Polynomial_Attribute.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Polynomial_Attribute.xml.svn-base
deleted file mode 100644
index f73b9d4..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Entity_Polynomial_Attribute.xml.svn-base
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test polynomial growth of expanded XML.
- Expansion happens in an attribute. -->
-<!DOCTYPE root [
-<!ELEMENT root EMPTY>
-<!ATTLIST root id CDATA #IMPLIED>
-<!ENTITY e1
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">
-<!ENTITY e2
"&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;&e1;">
-<!ENTITY e3
"&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;&e2;">
-<!ENTITY e4
"&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;&e3;">
-<!ENTITY e5
"&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;&e4;">
-<!ENTITY e6
"&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;&e5;">
-]>
-<root id="&e6;"/>
-
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_1.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_1.xml.svn-base
deleted file mode 100644
index 89d00d8..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_1.xml.svn-base
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test non-deterministic content model matching.
-
-The content model is chosen based on Theorem 2 of Katja Losemann et al.,
-"Descriptional Complexity of Deterministic Regular Expressions", 2012,
-<http://fox7.eu/wp-content/uploads/losemann-mfcs12.pdf>
-
--->
-<!DOCTYPE root [
-<!ELEMENT root
-(((a|b)
-|((a|b),(a|b))
-|((a|b),(a|b))
-|((a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))),
-b,
-((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b)))
->
-<!ELEMENT a EMPTY>
-<!ELEMENT b EMPTY>
-]>
-<root>
-
<b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/>
-</root>
-
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_2.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_2.xml.svn-base
deleted file mode 100644
index a5c11e8..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_2.xml.svn-base
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test non-deterministic content model matching.
-
-This should not actually pose any problems to validation.
-
--->
-<!DOCTYPE root [
-<!ELEMENT root
(e0|e1|e2|e3|e4|e5|e6|e7|e8|e9|e10|e11|e12|e13|e14|e15|e16|e17|e18|e19|e20|e21|e22|e23|e24|e25|e26|e27|e28|e29)>
-<!ELEMENT e0 EMPTY>
-<!ELEMENT e1 (e0,e0)>
-<!ELEMENT e2 (e1,e1)>
-<!ELEMENT e3 (e2,e2)>
-<!ELEMENT e4 (e3,e3)>
-<!ELEMENT e5 (e4,e4)>
-<!ELEMENT e6 (e5,e5)>
-<!ELEMENT e7 (e6,e6)>
-<!ELEMENT e8 (e7,e7)>
-<!ELEMENT e9 (e8,e8)>
-<!ELEMENT e10 (e9,e9)>
-<!ELEMENT e11 (e10,e10)>
-<!ELEMENT e12 (e11,e11)>
-<!ELEMENT e13 (e12,e12)>
-<!ELEMENT e14 (e13,e13)>
-<!ELEMENT e15 (e14,e14)>
-<!ELEMENT e16 (e15,e15)>
-<!ELEMENT e17 (e16,e16)>
-<!ELEMENT e18 (e17,e17)>
-<!ELEMENT e19 (e18,e18)>
-<!ELEMENT e20 (e19,e19)>
-<!ELEMENT e21 (e20,e20)>
-<!ELEMENT e22 (e21,e21)>
-<!ELEMENT e23 (e22,e22)>
-<!ELEMENT e24 (e23,e23)>
-<!ELEMENT e25 (e24,e24)>
-<!ELEMENT e26 (e25,e25)>
-<!ELEMENT e27 (e26,e26)>
-<!ELEMENT e28 (e27,e27)>
-<!ELEMENT e29 (e28,e28)>
-]>
-<root>
- <e1><e0/><e0/></e1>
-</root>
-
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_3.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_3.xml.svn-base
deleted file mode 100644
index 24c48a2..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Internal_Regexp_3.xml.svn-base
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test non-deterministic content model matching.
-
-Entity references are not part of the internal DTD subset (for good reason).
-
--->
-<!DOCTYPE root [
-<!ELEMENT e0 EMPTY>
-<!ENTITY % e1 "(e0,e0)">
-<!ENTITY % e2
"(%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;,%e1;)">
-<!ENTITY % e3
"(%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;,%e2;)">
-<!ENTITY % e4
"(%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;,%e3;)">
-<!ENTITY % e5
"(%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;,%e4;)">
-<!ENTITY % e6
"(%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;,%e5;)">
-<!ENTITY % e7
"(%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;,%e6;)">
-<!ENTITY % e8
"(%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;,%e7;)">
-<!ENTITY % e9
"(%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;,%e8;)">
-<!ELEMENT root (%e9;)?>
-]>
-<root/>
-
-
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_Public.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_Public.xml.svn-base
deleted file mode 100644
index aade0f9..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_Public.xml.svn-base
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test notation (PUBLIC). -->
-<!DOCTYPE root [
-<!NOTATION n1 PUBLIC "-//N1" "./XML-Parser-Referenced.xml">
-<!ELEMENT root (#PCDATA)>
-<!ATTLIST root attr NOTATION (n1) #IMPLIED>
-]>
-<root attr="n1"></root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_Public_URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_Public_URL.xml.svn-base
deleted file mode 100644
index 4fe750f..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_Public_URL.xml.svn-base
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test notation (PUBLIC URL). -->
-<!DOCTYPE root [
-<!NOTATION n1 PUBLIC "-//N1"
"http://www.example.com/notation">
-<!ELEMENT root (#PCDATA)>
-<!ATTLIST root attr NOTATION (n1) #IMPLIED>
-]>
-<root attr="n1"></root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_System.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_System.xml.svn-base
deleted file mode 100644
index 8ba042b..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_System.xml.svn-base
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test notation (SYSTEM). -->
-<!DOCTYPE root [
-<!NOTATION n1 SYSTEM "./XML-Parser-Referenced.xml">
-<!ELEMENT root (#PCDATA)>
-<!ATTLIST root attr NOTATION (n1) #IMPLIED>
-]>
-<root attr="n1"></root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_System_URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_System_URL.xml.svn-base
deleted file mode 100644
index 78b5138..0000000
---
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Notation_System_URL.xml.svn-base
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<!-- Test notation (SYSTEM URL). -->
-<!DOCTYPE root [
-<!NOTATION n1 SYSTEM "http://www.example.com/notation">
-<!ELEMENT root (#PCDATA)>
-<!ATTLIST root attr NOTATION (n1) #IMPLIED>
-]>
-<root attr="n1"></root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.dtd.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.dtd.svn-base
deleted file mode 100644
index 4bc85b4..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.dtd.svn-base
+++ /dev/null
@@ -1,28 +0,0 @@
-<!-- This DTD is invalid because the content model is not deterministic. -->
-<!ELEMENT root
-(((a|b)
-|((a|b),(a|b))
-|((a|b),(a|b))
-|((a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))
-|((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b))),
-b,
-((a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b),(a|b)))
->
-<!ELEMENT a EMPTY>
-<!ELEMENT b EMPTY>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.rng.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.rng.svn-base
deleted file mode 100644
index 191f835..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.rng.svn-base
+++ /dev/null
@@ -1,1010 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- This Relax NG schema has a non-deterministic content model
- (which is allowed). XML-Parser-Validate-Regexp_1.xml should
- validate against this schema. -->
-<grammar
xmlns="http://relaxng.org/ns/structure/1.0">
- <define name="root">
- <element name="root">
- <ref name="attlist.root"/>
- <choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- </choice>
- <ref name="b"/>
- <group>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- <choice>
- <ref name="a"/>
- <ref name="b"/>
- </choice>
- </group>
- </element>
- </define>
- <define name="attlist.root" combine="interleave">
- <empty/>
- </define>
- <define name="a">
- <element name="a">
- <ref name="attlist.a"/>
- <empty/>
- </element>
- </define>
- <define name="attlist.a" combine="interleave">
- <empty/>
- </define>
- <define name="b">
- <element name="b">
- <ref name="attlist.b"/>
- <empty/>
- </element>
- </define>
- <define name="attlist.b" combine="interleave">
- <empty/>
- </define>
- <start>
- <choice>
- <ref name="root"/>
- </choice>
- </start>
-</grammar>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.xml.svn-base
deleted file mode 100644
index e3c57a7..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<!-- To be validated against XML-Parser-XSD-Regexp_1.*. -->
-<root>
-
<b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/><b/>
-</root>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.xsd.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.xsd.svn-base
deleted file mode 100644
index e5a9f13..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_1.xsd.svn-base
+++ /dev/null
@@ -1,990 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- This should result in a violation of "Unique Particle Attribution"
- rule. -->
-<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
- <xs:element name="root">
- <xs:complexType>
- <xs:sequence>
- <xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- </xs:choice>
- <xs:element ref="b"/>
- <xs:sequence>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:sequence>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="a">
- <xs:complexType/>
- </xs:element>
- <xs:element name="b">
- <xs:complexType/>
- </xs:element>
-</xs:schema>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_4.xsd.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_4.xsd.svn-base
deleted file mode 100644
index 7c2eba4..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-Validate-Regexp_4.xsd.svn-base
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- This is a looser variant of Regexp_1.
-
-XML-Parser-Validate-Regexp_1.xml can be validated using this schema.
-
-The issue exposed by this schema has been reported as a Xerces bug in
-this report:
-
-<http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.4061&rep=rep1&type=pdf>
-
-The 5000 maxOccurs limit in OpenJDK still allows the creation of
-schemas which require large amounts of time and heap space to
-process.
--->
-<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
- <xs:element name="root">
- <xs:complexType>
- <xs:sequence maxOccurs="5000">
- <xs:choice>
- <xs:choice>
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- <xs:element ref="c"/>
- </xs:choice>
- </xs:choice>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="a">
- <xs:complexType/>
- </xs:element>
- <xs:element name="b">
- <xs:complexType/>
- </xs:element>
- <xs:element name="c">
- <xs:complexType/>
- </xs:element>
-</xs:schema>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-XInclude-File.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-XInclude-File.xml.svn-base
deleted file mode 100644
index e6fc009..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-XInclude-File.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<root>
- <xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
- href="xinclude.xml" />
-</root>
diff --git a/defensive-coding/src/data/.svn/text-base/XML-Parser-XInclude-URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-XInclude-URL.xml.svn-base
deleted file mode 100644
index 3afe285..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-XInclude-URL.xml.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<root>
- <xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
-
href="http://www.example.com/XInclude" />
-</root>
diff --git a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-File.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-File.xml.svn-base
deleted file mode 100644
index f12aba4..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-File.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<!-- Reference to an external XML Schema (file variant) -->
-<root xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="schema.xsd"/>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-Include_File.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-Include_File.xml.svn-base
deleted file mode 100644
index 0443d70..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-Include_File.xml.svn-base
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<!-- Reference to an XML Schema (file variant). -->
-<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
- <xs:include schemaLocation="schema.xsd"/>
- <xs:element name="root">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:complexType>
- </xs:element>
- <xs:element name="a">
- <xs:complexType/>
- </xs:element>
- <xs:element name="b">
- <xs:complexType/>
- </xs:element>
-</xs:schema>
diff --git
a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-Include_URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-Include_URL.xml.svn-base
deleted file mode 100644
index 282fb87..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-Include_URL.xml.svn-base
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<!-- Reference to an XML Schema (URL variant). -->
-<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
- <xs:include
schemaLocation="http://www.example.com/xsd"/>
- <xs:element name="root">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element ref="a"/>
- <xs:element ref="b"/>
- </xs:choice>
- </xs:complexType>
- </xs:element>
- <xs:element name="a">
- <xs:complexType/>
- </xs:element>
- <xs:element name="b">
- <xs:complexType/>
- </xs:element>
-</xs:schema>
diff --git a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-URL.xml.svn-base
b/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-URL.xml.svn-base
deleted file mode 100644
index 45df87f..0000000
--- a/defensive-coding/src/data/.svn/text-base/XML-Parser-XSD-URL.xml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<!-- Reference to an external XML Schema (URL variant) -->
-<root xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
-
xsi:noNamespaceSchemaLocation="http://www.example.com/xsd"/>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.