The "include" element is only supported with MSXSL and SAXON.
jing-trang-20181222+dfsg2/convert/from-trex.xsl 0000664 0000000 0000000 00000004475 13520105541 0021157 0 ustar 00root root 0000000 0000000
http://www.w3.org/2001/XMLSchema-datatypesinterleave
jing-trang-20181222+dfsg2/convert/simplify.xsl 0000664 0000000 0000000 00000001433 13520105541 0021057 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/copying.html 0000664 0000000 0000000 00000003360 13520105541 0017352 0 ustar 00root root 0000000 0000000
Jing Copying Conditions
Jing Copying Conditions
Copyright (c) 2001-2003 Thai Open Source Software Center Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
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.
Neither the name of the Thai Open Source Software Center Ltd nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS 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 REGENTS OR
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.
jing-trang-20181222+dfsg2/copying.txt 0000664 0000000 0000000 00000003021 13520105541 0017217 0 ustar 00root root 0000000 0000000 Copyright (c) 2001-2003 Thai Open Source Software Center Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
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.
Neither the name of the Thai Open Source Software Center Ltd nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS 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 REGENTS OR
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.
jing-trang-20181222+dfsg2/datatype-sample/ 0000775 0000000 0000000 00000000000 13520105541 0020104 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/build.xml 0000664 0000000 0000000 00000001135 13520105541 0021725 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/datatype-sample/datatype-sample.rng 0000664 0000000 0000000 00000000307 13520105541 0023706 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/datatype-sample/index.html 0000664 0000000 0000000 00000003177 13520105541 0022111 0 ustar 00root root 0000000 0000000
RELAX NG Pluggable Datatype Library Example
RELAX NG Pluggable Datatype Library Example
This package contains a very simple example of a pluggable datatype library.
The datatype library is implemented by the class
com.thaiopensource.datatype.sample.BalancedString. The
bulk of the implementation is inherited from the abstract class
com.thaiopensource.datatype.sample.SimpleDatatypeLibrary,
which provides default implementations for the methods in the
interfaces which a datatype library must implement. A class that
derives from SimpleDatatypeLibrary has only to implement
a boolean isValid(String literal) method. The datatype
library has the URI
http://www.thaiopensource.com/relaxng/datatypes/sample,
and contains exactly one datatype, which is called
balancedString. This datatype allows any string in which
parentheses are properly balanced (nested). To use this sample
datatype library, simply include datatype-sample.jar in
your CLASSPATH. You will then be able to validate against schemas
using this additional datatype. The file datatype-sample.rng is a simple RELAX
NG schema using this datatype; valid.xml is an
instance that is valid with respect to this schema; invalid.xml is an instance that is not valid
with respect to this schema.
James Clark
jing-trang-20181222+dfsg2/datatype-sample/invalid.xml 0000664 0000000 0000000 00000000056 13520105541 0022255 0 ustar 00root root 0000000 0000000 foo(bar(baz)
jing-trang-20181222+dfsg2/datatype-sample/src/ 0000775 0000000 0000000 00000000000 13520105541 0020673 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/META-INF/ 0000775 0000000 0000000 00000000000 13520105541 0022033 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/META-INF/services/ 0000775 0000000 0000000 00000000000 13520105541 0023656 5 ustar 00root root 0000000 0000000 org.relaxng.datatype.DatatypeLibraryFactory 0000664 0000000 0000000 00000000062 13520105541 0034207 0 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/META-INF/services com.thaiopensource.datatype.sample.BalancedString
jing-trang-20181222+dfsg2/datatype-sample/src/com/ 0000775 0000000 0000000 00000000000 13520105541 0021451 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/com/thaiopensource/ 0000775 0000000 0000000 00000000000 13520105541 0024501 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/com/thaiopensource/datatype/ 0000775 0000000 0000000 00000000000 13520105541 0026314 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/com/thaiopensource/datatype/sample/ 0000775 0000000 0000000 00000000000 13520105541 0027575 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/com/thaiopensource/datatype/sample/BalancedString.java0000664 0000000 0000000 00000001270 13520105541 0033320 0 ustar 00root root 0000000 0000000 package com.thaiopensource.datatype.sample;
public class BalancedString extends SimpleDatatypeLibrary {
private static final String DATATYPE_LIBRARY
= "http://www.thaiopensource.com/relaxng/datatypes/sample";
private static final String TYPE = "balancedString";
public BalancedString() {
super(DATATYPE_LIBRARY, TYPE);
System.err.println("Loaded balanced string");
}
protected boolean isValid(String literal) {
int len = literal.length();
int level = 0;
for (int i = 0; i < len; i++) {
switch (literal.charAt(i)) {
case '(':
++level;
break;
case ')':
if (--level < 0)
return false;
break;
}
}
return level == 0;
}
}
SimpleDatatypeLibrary.java 0000664 0000000 0000000 00000003757 13520105541 0034647 0 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/datatype-sample/src/com/thaiopensource/datatype/sample package com.thaiopensource.datatype.sample;
import org.relaxng.datatype.*;
import org.relaxng.datatype.helpers.ParameterlessDatatypeBuilder;
import org.relaxng.datatype.helpers.StreamingValidatorImpl;
public abstract class SimpleDatatypeLibrary implements Datatype,
DatatypeLibrary,
DatatypeLibraryFactory {
private final String uri;
private final String localName;
private final DatatypeBuilder datatypeBuilder;
protected SimpleDatatypeLibrary(String uri, String localName) {
this.uri = uri;
this.localName = localName;
this.datatypeBuilder = new ParameterlessDatatypeBuilder(this);
}
public DatatypeLibrary createDatatypeLibrary(String uri) {
return this.uri.equals(uri) ? this : null;
}
public DatatypeBuilder createDatatypeBuilder(String localName)
throws DatatypeException {
if (!this.localName.equals(localName))
throw new DatatypeException();
return datatypeBuilder;
}
public Datatype createDatatype(String localName)
throws DatatypeException {
return createDatatypeBuilder(localName).createDatatype();
}
protected abstract boolean isValid(String literal);
public void checkValid(String literal, ValidationContext context)
throws DatatypeException {
if (!isValid(literal, context))
throw new DatatypeException();
}
public boolean isValid(String literal, ValidationContext context) {
return isValid(literal);
}
public DatatypeStreamingValidator createStreamingValidator(ValidationContext context) {
return new StreamingValidatorImpl(this, context);
}
public Object createValue(String literal, ValidationContext context) {
if (!isValid(literal, context))
return null;
return literal;
}
public boolean sameValue(Object obj1, Object obj2) {
return obj1.equals(obj2);
}
public int valueHashCode(Object obj) {
return obj.hashCode();
}
public int getIdType() {
return ID_TYPE_NULL;
}
public boolean isContextDependent() {
return false;
}
}
jing-trang-20181222+dfsg2/datatype-sample/valid.xml 0000664 0000000 0000000 00000000057 13520105541 0021727 0 ustar 00root root 0000000 0000000 foo(bar(baz))
jing-trang-20181222+dfsg2/doc/ 0000775 0000000 0000000 00000000000 13520105541 0015557 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/doc/README.md 0000664 0000000 0000000 00000000344 13520105541 0017037 0 ustar 00root root 0000000 0000000 # Moved
On 2 December, 2018, these files were moved to the website repository:
> https://github.com/relaxng/relaxng.org
where they appear under the `/jclark/` directory. The are also available
at https://relaxng.org/jclark/
jing-trang-20181222+dfsg2/dtdinst/ 0000775 0000000 0000000 00000000000 13520105541 0016463 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/dtdinst/copying.txt 0000664 0000000 0000000 00000003021 13520105541 0020670 0 ustar 00root root 0000000 0000000 Copyright (c) 2001-2003 Thai Open Source Software Center Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
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.
Neither the name of the Thai Open Source Software Center Ltd nor
the names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS 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 REGENTS OR
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.
jing-trang-20181222+dfsg2/dtdinst/dtdinst.rnc 0000664 0000000 0000000 00000005726 13520105541 0020652 0 ustar 00root root 0000000 0000000 datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
start = element doctype { decl* }
decl =
elementDecl
| attlistDecl
| def
| overriddenDef
| externalIdRef
| includedSection
| ignoredSection
| internalEntityDecl
| externalEntityDecl
| notationDecl
| processingInstruction
| comment
def =
modelGroupDef
| attributeGroupDef
| enumGroupDef
| datatypeDef
| attributeDefaultDef
| flagDef
| nameSpecDef
| externalIdDef
| paramDef
elementDecl = element element { nameSpec, modelGroup }
modelGroupDef = element modelGroup { name, modelGroup }
datatypeDef = element datatype { name, datatype }
attributeDefaultDef = element attributeDefault { name, attributeDefault }
flagDef = element flag { name, flag }
nameSpecDef = element nameSpec { name, nameSpec }
externalIdDef = element externalId { name, externalId }
paramDef = element param { name, text }
overriddenDef = element overridden { def | duplicateDef }
duplicateDef = element duplicate { name }
includedSection =
element includedSection { attribute flag { xsd:NCName }?, decl* }
ignoredSection =
element ignoredSection { attribute flag { xsd:NCName }?, text }
externalIdRef = element externalIdRef { name, decl* }
internalEntityDecl = element internalEntity { name, text }
externalEntityDecl = element externalEntity { name, externalId }
notationDecl = element notation { name, externalId }
processingInstruction =
element processingInstruction { attribute target { xsd:NCName }, text }
comment = element comment { text }
datatype =
element tokenized {
attribute name { "NMTOKEN" | "NMTOKENS"
| "ENTITY" | "ENTITIES"
| "ID" | "IDREF" | "IDREFS" }
| (attribute name { "NOTATION" }?, enumGroup)
}
| element cdata { empty }
| element datatypeRef { name }
enumGroup =
(element enum { xsd:NMTOKEN }
| element enumGroupRef { name } )*
enumGroupDef = element enumGroup { name, enumGroup }
flag =
element include { empty }
| element ignore { empty }
| element flagRef { name }
attlistDecl = element attlist { nameSpec, attributeGroup }
attributeGroupDef = element attributeGroup { name, attributeGroup }
attributeGroup =
(element attribute { nameSpec, datatype, attributeDefault }
| element attributeGroupRef { name } )*
attributeDefault =
element implied { empty }
| element required { empty }
| element default|fixed { text }
| element attributeDefaultRef { name }
modelGroup =
element modelGroupRef { name }
| element elementRef { nameSpec }
| element oneOrMore { modelGroup }
| element zeroOrMore { modelGroup }
| element optional { modelGroup }
| element pcdata { empty }
| element choice { (modelGroup, modelGroup+)? }
| element sequence { (modelGroup, modelGroup+)? }
externalId =
attribute system { xsd:anyURI }?,
attribute public { text }?,
attribute xml:base { xsd:anyURI }?
name = attribute name { xsd:NCName }
nameSpec = element name { xsd:Name } | element nameSpecRef { name }
jing-trang-20181222+dfsg2/dtdinst/dtdinst2rng.xsl 0000664 0000000 0000000 00000012643 13520105541 0021463 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/ 0000775 0000000 0000000 00000000000 13520105541 0020116 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/dtdinst/example/attributeDefault.dtd 0000664 0000000 0000000 00000000302 13520105541 0024116 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/attributeDefault.xml 0000664 0000000 0000000 00000001537 13520105541 0024156 0 ustar 00root root 0000000 0000000
securitydivparadivparadivpara
jing-trang-20181222+dfsg2/dtdinst/example/attributeGroup.dtd 0000664 0000000 0000000 00000000311 13520105541 0023626 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/attributeGroup.xml 0000664 0000000 0000000 00000001421 13520105541 0023656 0 ustar 00root root 0000000 0000000
idclassfoobarfoobarbar
jing-trang-20181222+dfsg2/dtdinst/example/datatype.dtd 0000664 0000000 0000000 00000000176 13520105541 0022432 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/datatype.xml 0000664 0000000 0000000 00000000704 13520105541 0022454 0 ustar 00root root 0000000 0000000
holidayholidaystartDateendDate
jing-trang-20181222+dfsg2/dtdinst/example/enumGroup.dtd 0000664 0000000 0000000 00000000250 13520105541 0022571 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/enumGroup.xml 0000664 0000000 0000000 00000001153 13520105541 0022621 0 ustar 00root root 0000000 0000000
JPTHUKFRITemployeeemployeecountry
jing-trang-20181222+dfsg2/dtdinst/example/externalId.dtd 0000664 0000000 0000000 00000000062 13520105541 0022710 0 ustar 00root root 0000000 0000000
%decls;
jing-trang-20181222+dfsg2/dtdinst/example/externalId.ent 0000664 0000000 0000000 00000000025 13520105541 0022722 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/externalId.xml 0000664 0000000 0000000 00000000351 13520105541 0022736 0 ustar 00root root 0000000 0000000
doc
jing-trang-20181222+dfsg2/dtdinst/example/flag.dtd 0000664 0000000 0000000 00000000256 13520105541 0021527 0 ustar 00root root 0000000 0000000
]]>
jing-trang-20181222+dfsg2/dtdinst/example/flag.xml 0000664 0000000 0000000 00000001312 13520105541 0021546 0 ustar 00root root 0000000 0000000
bigsmallemparaembigsmall
jing-trang-20181222+dfsg2/dtdinst/example/modelGroup.dtd 0000664 0000000 0000000 00000000227 13520105541 0022731 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/modelGroup.xml 0000664 0000000 0000000 00000001250 13520105541 0022753 0 ustar 00root root 0000000 0000000
codeemparacodeem
jing-trang-20181222+dfsg2/dtdinst/example/nameSpec.dtd 0000664 0000000 0000000 00000000201 13520105541 0022337 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/nameSpec.xml 0000664 0000000 0000000 00000000751 13520105541 0022376 0 ustar 00root root 0000000 0000000
paraem
jing-trang-20181222+dfsg2/dtdinst/example/overridden.dtd 0000664 0000000 0000000 00000000366 13520105541 0022761 0 ustar 00root root 0000000 0000000
]]>
jing-trang-20181222+dfsg2/dtdinst/example/overridden.xml 0000664 0000000 0000000 00000001722 13520105541 0023003 0 ustar 00root root 0000000 0000000
bigsmallemembigsmallempara
jing-trang-20181222+dfsg2/dtdinst/example/param.dtd 0000664 0000000 0000000 00000000051 13520105541 0021707 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/dtdinst/example/param.xml 0000664 0000000 0000000 00000000234 13520105541 0021737 0 ustar 00root root 0000000 0000000
EMPTY
EMPTY
jing-trang-20181222+dfsg2/dtdinst/index.html 0000664 0000000 0000000 00000020474 13520105541 0020467 0 ustar 00root root 0000000 0000000
DTDinst
DTDinst is a program for converting XML DTDs into an XML instance
format.
Previous versions of DTDinst could also convert XML DTDs into RELAX
NG. This functionality has now migrated
into Trang, which now shares the DTDinst code.
The key feature of DTDinst is its handling of parameter entities.
It is able to reliably turn parameter entity declarations and
references into a variety of higher-level
semantic constructs. It can do this even in the presence of
arbitrarily deep nesting of parameter entity references within
parameter entity declarations. At the same time, it accurately
follows XML 1.0 rules on parameter entity expansion, so that any valid
XML 1.0 DTD can be handled. If a parameter entity is used in a way
that does not correspond to any of the higher-level semantics
constructs supported by DTDinst, then references to that parameter
entity will be expanded in the DTDinst output.
Getting DTDinst
DTDinst is available for download as the
file dtdinst-@VERSION@.zip, which contains binaries, source code and
documentation. It requires a Java runtime compatible with the Java 2
Platform, Standard Edition (J2SE) version 1.4 (or any later version),
such as the Java Runtime Environment (JRE), which can be
downloaded here.
The latest version of DTDinst will always be available in
the Downloads
section of the project
site.
Running DTDinst
To run DTDinst, use a command of the form:
java -jar dtdinst.jar DTD
The DTD argument can be either a file or a
URL.
DTDinst writes an XML representation of the DTD in DTDinst format to the standard output. For example,
the command
Each parameter entity declaration is
represented by one of the following elements:
modelGroup is used for a parameter entity that
represents all or part of the content model of an element (example, DTDinst output)
attributeGroup is used for a parameter entity
containing zero or more attribute definitions, which can be
referenced in an ATTLIST declaration (example, DTDinst output)
attributeDefault is used for a parameter entity
that represents the default value of an attribute (example, DTDinst output)
datatype is used for a parameter entity
that represents an attribute type (example, DTDinst output)
enumGroup is used for a parameter entity that
contains zero or more enumerated values (example, DTDinst output)
flag is used for a parameter entity with replacement
text INCLUDE or IGNORE, which can be used to
control a conditional section (example, DTDinst output)
nameSpec is used for a parameter entity that represents
the name of an element or attribute (example, DTDinst output)
externalId is used for an external parameter entity
that does not fall into any of the above categories (example, DTDinst output)
param is used for an internal parameter entity
that does not fall into any of the above categories (example, DTDinst output)
overridden is used for a parameter entity declaration
that is overridden by an earlier declaration of the same parameter
entity (example, DTDinst output)
The element used to represent a parameter entity reference depends
on the element used to represent the declaration of the parameter
entity.
If the declaration is represented by a modelGroup,
attributeGroup, attributeDefault,
datatype, enumGroup, flag or
nameSpec element, then the reference will be represented
by a modelGroupRef, attributeGroupRef,
attributeDefaultRef, datatypeRef,
enumGroupRef, flagRef or
nameSpecRef element respectively.
If the declaration is represented by externalId and
the reference occurs at the declaration level (i.e. at a point where a
declaration would be allowed), then the reference will be represented
by a externalIdRef element containing the declarations
from the external entity.
Otherwise, the reference will be expanded and there will be no
indication that a reference was originally used in the DTD.
An XSLT stylesheet is available that
converts DTDinst format to RELAX NG. It has many more limitations than
the converter builtin to DTDinst, but it may be useful as a basis for
XSLT-based processing of DTDinst format.
Sample DTDs
You may find it interesting to experiment with the following XML DTDs
which are available online:
DTDinst does not attempt to understand the contents of ignored
conditional sections: DTDinst format represents the contents of an
ignored section as a string. If you wish to preserve information
about conditional sections, you should therefore make as many
conditional sections as possible be included marked sections rather
than ignored marked sections. You can do this by creating a wrapper
DTD that declares parameter entities as INCLUDE and then
references the real DTD. For example, you might use this wrapper DTD to convert the TEI P4 DTD.
DTDinst does not attempt to understand the contents of parameter
entities that are never referenced.
Reporting bugs
Please report bugs by creating a new issue in
the Issues
section of the project site. Be sure to attach a complete DTD for
which DTDinst exhibits the bug.
The overall structure of RELAX modulesNamespace declarations cannot be controlled by
RELAX Core. Wait for RELAX modularization.div elements in modules
Interfacediv elements in interfaces
Include
Hedge ModelsThis is used to describe element hedge models.
It is also used as subordinates of <sequence>,
<choice>, and <mixed>.
This is used to specify the "occurs" attribute,
which is shared by several elements.?*+with the label attributewith the type attribute
Ruleswithout embedded tag or attPool elementswith the type attributewith embedded tag or attPool elementswith the type attributewithout embedded tag or attPool elementswith a hedge modelwith embedded tag or attPool elementswith a hedge model
Clausestag elements embedded in elementRulesattPool elements embedded in elementRulestrue
jing-trang-20181222+dfsg2/eg/relaxCoreDatatypes.rng 0000664 0000000 0000000 00000015613 13520105541 0021726 0 ustar 00root root 0000000 0000000
hexbase64
jing-trang-20181222+dfsg2/eg/relaxng.rng 0000664 0000000 0000000 00000017601 13520105541 0017562 0 ustar 00root root 0000000 0000000
choiceinterleave
jing-trang-20181222+dfsg2/eg/testSuite.rng 0000664 0000000 0000000 00000007120 13520105541 0020106 0 ustar 00root root 0000000 0000000
([\-A-Za-z0-9:@&=+$,_.!~*'()]|%[0-9a-fA-F][0-9a-fA-F])+
jing-trang-20181222+dfsg2/eg/xslt.rng 0000664 0000000 0000000 00000064007 13520105541 0017116 0 ustar 00root root 0000000 0000000
1.0versionversionextension-element-prefixesexclude-result-prefixesuse-attribute-setsyesnoyesnosinglemultipleanyalphabetictraditionaltextnumberascendingdescendingupper-firstlower-firstyesnoxmlhtmltextyesnoyesnoyesno#default#default
\*|\i\c*:\*
1
.*:.*
([^\{\}]|\{\{|\}\})*\{([^"'\{\}]|"[^"]*"|'[^']*')+\}([^\{\}]|\{\{|\}\}|\{([^"'\{\}]|"[^"]*"|'[^']*')+\})*
[^\{\}]*(\{\{|\}\}|\{([^"'\{\}]|"[^"]*"|'[^']*')+\})([^\{\}]|\{\{|\}\}|\{([^"'\{\}]|"[^"]*"|'[^']*')+\})*
([^\{\}]|\{\{|\}\}|\{([^"'\{\}]|"[^"]*"|'[^']*')+\})*
jing-trang-20181222+dfsg2/extapidoc/ 0000775 0000000 0000000 00000000000 13520105541 0016772 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/jaxp/ 0000775 0000000 0000000 00000000000 13520105541 0017734 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/jaxp/1.1/ 0000775 0000000 0000000 00000000000 13520105541 0020233 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/jaxp/1.1/package-list 0000664 0000000 0000000 00000000176 13520105541 0022526 0 ustar 00root root 0000000 0000000 javax.xml.parsers
javax.xml.transform
javax.xml.transform.dom
javax.xml.transform.sax
javax.xml.transform.stream
org.w3c.dom
jing-trang-20181222+dfsg2/extapidoc/jdk/ 0000775 0000000 0000000 00000000000 13520105541 0017542 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/jdk/1.3/ 0000775 0000000 0000000 00000000000 13520105541 0020043 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/jdk/1.3/package-list 0000664 0000000 0000000 00000002515 13520105541 0022335 0 ustar 00root root 0000000 0000000 java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
java.awt.geom
java.awt.im
java.awt.im.spi
java.awt.image
java.awt.image.renderable
java.awt.print
java.beans
java.beans.beancontext
java.io
java.lang
java.lang.ref
java.lang.reflect
java.math
java.net
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server
java.security
java.security.acl
java.security.cert
java.security.interfaces
java.security.spec
java.sql
java.text
java.util
java.util.jar
java.util.zip
javax.accessibility
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
javax.rmi
javax.rmi.CORBA
javax.sound.midi
javax.sound.midi.spi
javax.sound.sampled
javax.sound.sampled.spi
javax.swing
javax.swing.border
javax.swing.colorchooser
javax.swing.event
javax.swing.filechooser
javax.swing.plaf
javax.swing.plaf.basic
javax.swing.plaf.metal
javax.swing.plaf.multi
javax.swing.table
javax.swing.text
javax.swing.text.html
javax.swing.text.html.parser
javax.swing.text.rtf
javax.swing.tree
javax.swing.undo
javax.transaction
org.omg.CORBA
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.portable
org.omg.CORBA.TypeCodePackage
org.omg.CosNaming
org.omg.CosNaming.NamingContextPackage
org.omg.SendingContext
org.omg.stub.java.rmi
jing-trang-20181222+dfsg2/extapidoc/jdk/1.5/ 0000775 0000000 0000000 00000000000 13520105541 0020045 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/jdk/1.5/package-list 0000664 0000000 0000000 00000006437 13520105541 0022346 0 ustar 00root root 0000000 0000000 java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
java.awt.geom
java.awt.im
java.awt.im.spi
java.awt.image
java.awt.image.renderable
java.awt.print
java.beans
java.beans.beancontext
java.io
java.lang
java.lang.annotation
java.lang.instrument
java.lang.management
java.lang.ref
java.lang.reflect
java.math
java.net
java.nio
java.nio.channels
java.nio.channels.spi
java.nio.charset
java.nio.charset.spi
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server
java.security
java.security.acl
java.security.cert
java.security.interfaces
java.security.spec
java.sql
java.text
java.util
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
java.util.jar
java.util.logging
java.util.prefs
java.util.regex
java.util.zip
javax.accessibility
javax.activity
javax.crypto
javax.crypto.interfaces
javax.crypto.spec
javax.imageio
javax.imageio.event
javax.imageio.metadata
javax.imageio.plugins.bmp
javax.imageio.plugins.jpeg
javax.imageio.spi
javax.imageio.stream
javax.management
javax.management.loading
javax.management.modelmbean
javax.management.monitor
javax.management.openmbean
javax.management.relation
javax.management.remote
javax.management.remote.rmi
javax.management.timer
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
javax.net
javax.net.ssl
javax.print
javax.print.attribute
javax.print.attribute.standard
javax.print.event
javax.rmi
javax.rmi.CORBA
javax.rmi.ssl
javax.security.auth
javax.security.auth.callback
javax.security.auth.kerberos
javax.security.auth.login
javax.security.auth.spi
javax.security.auth.x500
javax.security.cert
javax.security.sasl
javax.sound.midi
javax.sound.midi.spi
javax.sound.sampled
javax.sound.sampled.spi
javax.sql
javax.sql.rowset
javax.sql.rowset.serial
javax.sql.rowset.spi
javax.swing
javax.swing.border
javax.swing.colorchooser
javax.swing.event
javax.swing.filechooser
javax.swing.plaf
javax.swing.plaf.basic
javax.swing.plaf.metal
javax.swing.plaf.multi
javax.swing.plaf.synth
javax.swing.table
javax.swing.text
javax.swing.text.html
javax.swing.text.html.parser
javax.swing.text.rtf
javax.swing.tree
javax.swing.undo
javax.transaction
javax.transaction.xa
javax.xml
javax.xml.datatype
javax.xml.namespace
javax.xml.parsers
javax.xml.transform
javax.xml.transform.dom
javax.xml.transform.sax
javax.xml.transform.stream
javax.xml.validation
javax.xml.xpath
org.ietf.jgss
org.omg.CORBA
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.TypeCodePackage
org.omg.CORBA.portable
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CosNaming
org.omg.CosNaming.NamingContextExtPackage
org.omg.CosNaming.NamingContextPackage
org.omg.Dynamic
org.omg.DynamicAny
org.omg.DynamicAny.DynAnyFactoryPackage
org.omg.DynamicAny.DynAnyPackage
org.omg.IOP
org.omg.IOP.CodecFactoryPackage
org.omg.IOP.CodecPackage
org.omg.Messaging
org.omg.PortableInterceptor
org.omg.PortableInterceptor.ORBInitInfoPackage
org.omg.PortableServer
org.omg.PortableServer.CurrentPackage
org.omg.PortableServer.POAManagerPackage
org.omg.PortableServer.POAPackage
org.omg.PortableServer.ServantLocatorPackage
org.omg.PortableServer.portable
org.omg.SendingContext
org.omg.stub.java.rmi
org.w3c.dom
org.w3c.dom.bootstrap
org.w3c.dom.events
org.w3c.dom.ls
org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers
jing-trang-20181222+dfsg2/extapidoc/jdk/1.6/ 0000775 0000000 0000000 00000000000 13520105541 0020046 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/jdk/1.6/package-list 0000664 0000000 0000000 00000007771 13520105541 0022351 0 ustar 00root root 0000000 0000000 java.applet
java.awt
java.awt.color
java.awt.datatransfer
java.awt.dnd
java.awt.event
java.awt.font
java.awt.geom
java.awt.im
java.awt.im.spi
java.awt.image
java.awt.image.renderable
java.awt.print
java.beans
java.beans.beancontext
java.io
java.lang
java.lang.annotation
java.lang.instrument
java.lang.management
java.lang.ref
java.lang.reflect
java.math
java.net
java.nio
java.nio.channels
java.nio.channels.spi
java.nio.charset
java.nio.charset.spi
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server
java.security
java.security.acl
java.security.cert
java.security.interfaces
java.security.spec
java.sql
java.text
java.text.spi
java.util
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
java.util.jar
java.util.logging
java.util.prefs
java.util.regex
java.util.spi
java.util.zip
javax.accessibility
javax.activation
javax.activity
javax.annotation
javax.annotation.processing
javax.crypto
javax.crypto.interfaces
javax.crypto.spec
javax.imageio
javax.imageio.event
javax.imageio.metadata
javax.imageio.plugins.bmp
javax.imageio.plugins.jpeg
javax.imageio.spi
javax.imageio.stream
javax.jws
javax.jws.soap
javax.lang.model
javax.lang.model.element
javax.lang.model.type
javax.lang.model.util
javax.management
javax.management.loading
javax.management.modelmbean
javax.management.monitor
javax.management.openmbean
javax.management.relation
javax.management.remote
javax.management.remote.rmi
javax.management.timer
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
javax.net
javax.net.ssl
javax.print
javax.print.attribute
javax.print.attribute.standard
javax.print.event
javax.rmi
javax.rmi.CORBA
javax.rmi.ssl
javax.script
javax.security.auth
javax.security.auth.callback
javax.security.auth.kerberos
javax.security.auth.login
javax.security.auth.spi
javax.security.auth.x500
javax.security.cert
javax.security.sasl
javax.sound.midi
javax.sound.midi.spi
javax.sound.sampled
javax.sound.sampled.spi
javax.sql
javax.sql.rowset
javax.sql.rowset.serial
javax.sql.rowset.spi
javax.swing
javax.swing.border
javax.swing.colorchooser
javax.swing.event
javax.swing.filechooser
javax.swing.plaf
javax.swing.plaf.basic
javax.swing.plaf.metal
javax.swing.plaf.multi
javax.swing.plaf.synth
javax.swing.table
javax.swing.text
javax.swing.text.html
javax.swing.text.html.parser
javax.swing.text.rtf
javax.swing.tree
javax.swing.undo
javax.tools
javax.transaction
javax.transaction.xa
javax.xml
javax.xml.bind
javax.xml.bind.annotation
javax.xml.bind.annotation.adapters
javax.xml.bind.attachment
javax.xml.bind.helpers
javax.xml.bind.util
javax.xml.crypto
javax.xml.crypto.dom
javax.xml.crypto.dsig
javax.xml.crypto.dsig.dom
javax.xml.crypto.dsig.keyinfo
javax.xml.crypto.dsig.spec
javax.xml.datatype
javax.xml.namespace
javax.xml.parsers
javax.xml.soap
javax.xml.stream
javax.xml.stream.events
javax.xml.stream.util
javax.xml.transform
javax.xml.transform.dom
javax.xml.transform.sax
javax.xml.transform.stax
javax.xml.transform.stream
javax.xml.validation
javax.xml.ws
javax.xml.ws.handler
javax.xml.ws.handler.soap
javax.xml.ws.http
javax.xml.ws.soap
javax.xml.ws.spi
javax.xml.xpath
org.ietf.jgss
org.omg.CORBA
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.TypeCodePackage
org.omg.CORBA.portable
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CosNaming
org.omg.CosNaming.NamingContextExtPackage
org.omg.CosNaming.NamingContextPackage
org.omg.Dynamic
org.omg.DynamicAny
org.omg.DynamicAny.DynAnyFactoryPackage
org.omg.DynamicAny.DynAnyPackage
org.omg.IOP
org.omg.IOP.CodecFactoryPackage
org.omg.IOP.CodecPackage
org.omg.Messaging
org.omg.PortableInterceptor
org.omg.PortableInterceptor.ORBInitInfoPackage
org.omg.PortableServer
org.omg.PortableServer.CurrentPackage
org.omg.PortableServer.POAManagerPackage
org.omg.PortableServer.POAPackage
org.omg.PortableServer.ServantLocatorPackage
org.omg.PortableServer.portable
org.omg.SendingContext
org.omg.stub.java.rmi
org.w3c.dom
org.w3c.dom.bootstrap
org.w3c.dom.events
org.w3c.dom.ls
org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers
jing-trang-20181222+dfsg2/extapidoc/sax/ 0000775 0000000 0000000 00000000000 13520105541 0017565 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/extapidoc/sax/package-list 0000664 0000000 0000000 00000000062 13520105541 0022052 0 ustar 00root root 0000000 0000000 org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers
jing-trang-20181222+dfsg2/gcj/ 0000775 0000000 0000000 00000000000 13520105541 0015555 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/gcj/INSTALL 0000664 0000000 0000000 00000022004 13520105541 0016604 0 ustar 00root root 0000000 0000000 Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for variables by setting
them in the environment. You can do that on the command line like this:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
jing-trang-20181222+dfsg2/gcj/README.redhat8 0000664 0000000 0000000 00000001520 13520105541 0017771 0 ustar 00root root 0000000 0000000 GCJ as shipped in RedHat 8.0 has a bug in the list of libraries that
it uses to link with. Amongst other things, this causes any Java
program that throws an unhandled exception to hang while printing a
stack trace. See .
If you are running RedHat 8.0, I recommend you apply the following
patch before compiling:
--- /usr/lib/gcc-lib/i386-redhat-linux/3.2/libgcj.spec~ 2002-09-04 04:03:39.000000000 +0100
+++ /usr/lib/gcc-lib/i386-redhat-linux/3.2/libgcj.spec 2002-12-10 15:59:39.000000000 +0000
@@ -4,6 +4,6 @@
# to link with libgcj.
#
%rename lib liborig
-*lib: -lgcj -lm -lz -ldl %(libgcc) %(liborig)
+*lib: -lgcj -lm -lpthread -lz -ldl %(libgcc) %(liborig)
*jc1: -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions
jing-trang-20181222+dfsg2/gcj/aclocal.m4 0000664 0000000 0000000 00000002517 13520105541 0017422 0 ustar 00root root 0000000 0000000 m4_define([AC_LANG(Java)],
[ac_ext=java
ac_compile='$GCJ -c $GCJFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
ac_link='$GCJ --main=conftest -o conftest$ac_exeext $GCJFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
])
AU_DEFUN([AC_LANG_JAVA], [AC_LANG(Java)])
m4_define([_AC_LANG_ABBREV(JAVA)], [java])
m4_define([AC_LANG_SOURCE(Java)],
[$1])
m4_define([AC_LANG_PROGRAM(Java)],
[$1
public class conftest {
static public void main(String[] args) {
$2
}
}])
AC_DEFUN([AC_LANG_COMPILER(Java)],
[AC_REQUIRE([AC_PROG_GCJ])])
AC_DEFUN([AC_PROG_GCJ],
[AC_LANG_PUSH(Java)dnl
AC_ARG_VAR([GCJ], [Java compiler command])
AC_ARG_VAR([GCJFLAGS], [Java compiler flags])
_AC_ARG_VAR_LDFLAGS()dnl
m4_ifval([$1],
[AC_CHECK_TOOLS(GCJ, [$1])],
[if test -z "$GCJ"; then
AC_CHECK_TOOL(GCJ, gcj)
fi])
test -z "$GCJ" && AC_MSG_ERROR([GCJ not found in \$PATH])
test "${GCJFLAGS+set}" = set || GCJFLAGS="-g -O2"
])
AC_DEFUN([TRY_ORG_XML_SAX],
[AC_TRY_LINK([import org.xml.sax.helpers.XMLReaderFactory;
import org.xml.sax.SAXException;],
[try { XMLReaderFactory.createXMLReader(); } catch (SAXException e) { }],
[$1], [$2])])
AC_DEFUN([GCJ_LIB_SAX],
[AC_MSG_CHECKING([what library contains org.xml.sax])
TRY_ORG_XML_SAX([AC_MSG_RESULT([built in])],
[LIBS=-l-org-xml-sax
TRY_ORG_XML_SAX([AC_MSG_RESULT([-l-org-xml-sax])],
[LIBS=
AC_MSG_RESULT([none found])])])])
jing-trang-20181222+dfsg2/gcj/configure.ac 0000664 0000000 0000000 00000000174 13520105541 0020045 0 ustar 00root root 0000000 0000000 AC_INIT(@PROG@, @PROG_VERSION@)
AC_PROG_INSTALL
AC_PROG_GCJ
GCJ_LIB_SAX
AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
jing-trang-20181222+dfsg2/gcj/dist 0000775 0000000 0000000 00000016176 13520105541 0016461 0 ustar 00root root 0000000 0000000 #!/bin/sh
set -e
jing_main=com.thaiopensource.relaxng.util.Driver
jing_test_main=com.thaiopensource.relaxng.util.TestDriver
trang_main=com.thaiopensource.relaxng.translate.Driver
trang_test_main=com.thaiopensource.relaxng.translate.test.CompactTestDriver
a_jing_file=src/com/thaiopensource/relaxng/util/Driver.java
crimson_version=1.1.3
xerces_version=2.3.0
jing_version_properties=src/com/thaiopensource/relaxng/util/resources/Version.properties
trang_version_properties=trang/src/com/thaiopensource/relaxng/translate/resources/Version.properties
crimson_unwanted="
org/w3c
org/xml
org/apache/crimson/tree
org/apache/crimson/jaxp/DocumentBuilderImpl.java
org/apache/crimson/jaxp/DocumentBuilderFactoryImpl.java
javax/xml/parsers/DocumentBuilder.java
javax/xml/parsers/DocumentBuilderFactory.java
META-INF/services/javax.xml.parsers.DocumentBuilderFactory
META-INF/services/javax.xml.transform.TransformerFactory
META-INF/jaxp-javax.manifest
META-INF/manifest.crimson
"
jing_unwanted="
com/thaiopensource/datatype/xsd/regex/jdk1_4
com/thaiopensource/datatype/xsd/regex/xerces
com/thaiopensource/relaxng/jarv
com/thaiopensource/relaxng/util/JingTask.java
com/thaiopensource/validate/xerces
com/thaiopensource/validate/schematron
com/thaiopensource/validate/jarv
META-INF/services/org.iso_relax.verifier.VerifierFactoryLoader
"
jing_unwanted_in_trang="
com/thaiopensource/relaxng/impl
com/thaiopensource/relaxng/util
com/thaiopensource/relaxng/SchemaFactory.java
com/thaiopensource/validate
"
jing_test="dir.xsl exslt.xsl prep.xsl
spectest.xml xsdtest.xml xsdtest.xsl mnstest.xml nrltest.xml"
if [ -f ../${a_jing_file} ]; then
cd ..
elif [ ! -f ${a_jing_file} ]; then
echo You are in the wrong directory >&2
exit 1
fi
if [ $# -gt 0 ]; then
jing_build_dir=$1
else
jing_build_dir=build
fi
jing_build_dir=`cd ${jing_build_dir}; pwd`
build_dir=${jing_build_dir}/gcj
dist_dir=${jing_build_dir}/dist/gcj
top_dir=`pwd`
rm -fr ${build_dir}
test -f ${build_dir} || mkdir -p ${build_dir}
. ${jing_version_properties}
jing_version=$version
. ${trang_version_properties}
trang_version=$version
jing_dir=${build_dir}/jing-${jing_version}
trang_dir=${build_dir}/trang-${trang_version}
mkdir -p ${jing_dir} ${trang_dir}
(ls src/META-INF/services/*.*; find src -name '*.java' -or -name '*.jj' -or -name '*.properties' -or -name '*.rng') | cpio --quiet -p -m -d ${jing_dir}
cd ${jing_dir}/src
rm -fr ${jing_unwanted}
f=com/thaiopensource/relaxng/util/resources/Messages.properties
sed -e 's/java com.thaiopensource.relaxng.util.Driver/jing/' $f >tem
mv tem $f
echo com.thaiopensource.datatype.xsd.regex.xerces2.RegexEngineImpl >META-INF/services/com.thaiopensource.datatype.xsd.regex.RegexEngine
cd ${top_dir}
CLASSPATH=lib/JavaCC.zip gij COM.sun.labs.javacc.Main -output_directory=${jing_dir}/src/com/thaiopensource/relaxng/parse/compact ${jing_dir}/src/com/thaiopensource/relaxng/parse/compact/CompactSyntax.jj >/dev/null
f=${jing_dir}/src/com/thaiopensource/relaxng/parse/compact/CompactSyntaxTokenManager.java
sed -e 's/java.io.IOException/EOFException/g' $f >${build_dir}/tem
mv ${build_dir}/tem $f
cd ${build_dir}
tar xfz ${top_dir}/gcj/crimson-${crimson_version}-src.tar.gz crimson-${crimson_version}/src
cd crimson-${crimson_version}
patch -p0 <${top_dir}/gcj/crimson.patch
cd src
rm -fr ${crimson_unwanted}
find org javax -type f -not -name '*.java' -not -name '*.properties' | xargs rm -f
cd ${top_dir}
cp -a ${build_dir}/crimson-${crimson_version}/src/* ${jing_dir}/src
rm -fr ${build_dir}/crimson-${crimson_version}
cd ${build_dir}
xerces_top_dir=xerces-`echo ${xerces_version} | tr . _`
xerces_src_dir=${xerces_top_dir}/src
tar xfz ${top_dir}/gcj/Xerces-J-src.${xerces_version}.tar.gz ${xerces_src_dir}/org/apache/xerces/impl/xpath/regex
cd ${top_dir}
cp -a ${build_dir}/${xerces_src_dir}/* ${jing_dir}/src
rm -fr ${build_dir}/${xerces_top_dir}
cd ${jing_dir}
patch -p0 <${top_dir}/gcj/xerces-regex.patch
rm -f `find src -name '*~'`
cd ${top_dir}
cp -a ${jing_dir}/src ${trang_dir}
cd dtdinst
find src -name '*.java' -or -name '*.properties' | cpio --quiet -p -m -d ${trang_dir}
cd ../trang
find src -name '*.java' -or -name '*.properties' | cpio --quiet -p -m -d ${trang_dir}
cd ${trang_dir}/src
rm -fr ${jing_unwanted_in_trang}
f=com/thaiopensource/relaxng/translate/resources/Messages.properties
sed -e 's/java com.thaiopensource.relaxng.translate.Driver/trang/' $f >tem
mv tem $f
cd ${top_dir}
setup_prog() {
cd ${prog_src_dir}
sed -e "s/@PROG@/${prog}/" -e "s/@MAIN@/${main}/" -e "s/@TEST_MAIN@/${test_main}/" ${top_dir}/gcj/vars.mk >Makefile.in
echo SOURCES=\\ >>Makefile.in
find src -name '*.java' | sed -e 's;^; $(srcdir)/;' -e 's/$/ \\/' -e '$s/ \\//' >>Makefile.in
echo RESOURCES=\\ >>Makefile.in
find src -type f -not -name '*.java' -not -name '*.jj' | sed -e 's;^; ;' -e 's/$/.o/' -e 's/$/ \\/' -e '$s/ \\//' >>Makefile.in
echo DIRS=src \\ >>Makefile.in
find src/* -type d -not -name '*.java' -not -name '*.jj' | sed -e 's;^; ;' -e 's/$/ \\/' -e '$s/ \\//' >>Makefile.in
cat ${top_dir}/gcj/rules.mk >>Makefile.in
find src -type f -not -name '*.java' -not -name '*.jj' -exec mv "{}" "{}.resource" ";"
sed -e "s/@PROG@/${prog}/" -e "s/@PROG_VERSION@/${prog_version}/" ${top_dir}/gcj/configure.ac >configure.ac
cp -a ${top_dir}/gcj/aclocal.m4 .
cp -a ${top_dir}/gcj/install-sh .
cp -a ${top_dir}/gcj/mkinstalldirs .
cp -a ${top_dir}/gcj/INSTALL .
sed -e "s/@VERSION@/${prog_version}/" ${top_dir}/gcj/${prog}.1 >${prog}.1
autoconf
rm -fr autom4te*
sed -e "/^Version:/s/:.*/: ${prog_version}/" ${top_dir}/gcj/${prog}.spec >${prog}.spec
cat >copying.txt <>copying.txt
cat >>copying.txt <>copying.txt
cat >>copying.txt <>copying.txt
cp -a ${top_dir}/gcj/README.redhat8 .
mkdir test
}
prog=jing
main=${jing_main}
test_main=${jing_test_main}
prog_version=${jing_version}
prog_src_dir=${jing_dir}
copying=${top_dir}/copying.txt
setup_prog
cd test
for f in ${jing_test}; do cp -a ${top_dir}/test/$f .; done
cp -a ${top_dir}/gcj/test_jing.mk Makefile.in
cd ${top_dir}
prog=trang
main=${trang_main}
test_main=${trang_test_main}
prog_version=${trang_version}
prog_src_dir=${trang_dir}
copying=${top_dir}/trang/copying.txt
setup_prog
sed -e "s/@VERSION@/${trang_version}/g" ${top_dir}/trang/doc/trang-manual.html >trang-manual.html
cd test
cp -a ${top_dir}/trang/test/compacttest.xml .
cp -a ${top_dir}/trang/test/toxsdtest.xml .
cp -a ${top_dir}/test/dir.xsl .
cp -a ${top_dir}/test/exslt.xsl .
cp -a ${top_dir}/trang/test/compactprep.xsl prep.xsl
cp -a ${top_dir}/gcj/test_trang.mk Makefile.in
cd ${top_dir}
test -d ${dist_dir} || mkdir -p ${dist_dir}
cd ${dist_dir}
abs_dist_dir=`pwd`
cd ${top_dir}
cd ${jing_dir}/..
tar cfz ${abs_dist_dir}/jing-${jing_version}.tar.gz jing-${jing_version}
cd ${top_dir}
cd ${trang_dir}/..
tar cfz ${abs_dist_dir}/trang-${trang_version}.tar.gz trang-${trang_version}
jing-trang-20181222+dfsg2/gcj/install-sh 0000775 0000000 0000000 00000012701 13520105541 0017562 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
:
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
:
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0
jing-trang-20181222+dfsg2/gcj/jing.1 0000664 0000000 0000000 00000003247 13520105541 0016574 0 ustar 00root root 0000000 0000000 .TH jing 1 @VERSION@
.SH NAME
jing \- validate an XML document using a RELAX NG schema
.SH SYNOPSIS
.B jing
.RB [ \-cfit ]
.RB [ \-e
.IR encoding ]
.I rng-file
.RI [ xml-file ...]
.SH DESCRIPTION
If
.I rng-file
is a correct RELAX NG schema and each
.I xml-file
is a well-formed XML document that is valid with respect to
.IR rng-file ,
then
.B jing
will be silent and terminate with a status of 0.
Otherwise,
.B jing
will report one or more errors to the standard
output and will terminate with a status of 1.
Both
.I rng-file
and
.I xml-file
can be filenames or URIs.
.SH OPTIONS
.TP
.B \-c
Uses the compact syntax for the schema.
.TP
.BI \-e " enc"
Uses the encoding
.I enc
to read the schema.
.TP
.BI \-f
Checks that the document is feasibly valid. A document is feasibly
valid if it could be transformed into a valid document by inserting
any number of attributes and child elements anywhere in the tree.
This is equivalent to transforming the schema by wrapping every
.BR data ,
.BR list ,
.B element
and
.B attribute
element in an
.B optional
element and then validating against the transformed schema. This
option may be useful while a document is still under construction.
This option also disables checking that for every IDREF there is a
corresponding ID.
.TP
.B \-i
Disables checking of ID/IDREF/IDREFS. By default,
Jing enforces the constraints imposed by RELAX NG DTD Compatibility
with respect to ID/IDREF/IDREFS.
.TP
.B \-t
Prints the time used by Jing for loading the schema and
for validation.
.SH "SEE ALSO"
trang(1)
.PP
http://relaxng.org
.SH AUTHOR
James Clark (jjc@jclark.com)
.PP
This product includes software developed by the
Apache Software Foundation (http://www.apache.org/).
jing-trang-20181222+dfsg2/gcj/jing.spec 0000664 0000000 0000000 00000001616 13520105541 0017364 0 ustar 00root root 0000000 0000000 Summary: A RELAX NG Validator.
Name: jing
Version:
Release: 1
URL: http://www.thaiopensource.com/relaxng/
Source: %{name}-%{version}.tar.gz
License: BSD
Group: Applications/Text
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: gcc-java >= 3.2-7
%description
Jing is an implementation of RELAX NG, a schema language for
XML. RELAX NG has been standardized by OASIS and is in the final
stages of standardization by ISO as ISO/IEC 19757-2. Jing validates
an XML document against a RELAX NG schema. Jing supports both the
original XML syntax for RELAX NG schemas, and the more recent non-XML
compact syntax.
%prep
%setup -q
%build
%configure GCJFLAGS="${GCJFLAGS:-%optflags}"
make
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_bindir}/jing
%{_mandir}/man1/jing.1*
%changelog
* Sat Feb 22 2003 James Clark
- Initial build.
jing-trang-20181222+dfsg2/gcj/mkinstalldirs 0000775 0000000 0000000 00000003411 13520105541 0020362 0 ustar 00root root 0000000 0000000 #! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* ) # -h for help
echo "${usage}" 1>&2; exit 0 ;;
-m ) # -m PERM arg
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi ;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 3
# End:
# mkinstalldirs ends here
jing-trang-20181222+dfsg2/gcj/readme.txt 0000664 0000000 0000000 00000001006 13520105541 0017550 0 ustar 00root root 0000000 0000000 The RPMs require libgcj-3.2. This is included with RedHat 8.0. You can
download the libgcj-3.2 RPM from:
http://rpmfind.net//linux/RPM/redhat/8.0/i386/libgcj-3.2-7.i386.html
However, the libgcj RPM depends on particular versions of libgcc and
glibc. So, if you are not running RedHat 8, you might find it easier
to rebuild the RPMs from source. You would need gcc-3.2 or later
installed with Java enabled. Then you can rebuild the RPMs using:
rpmbuild -ta jing-YYYYMMDD.tar.gz
rpmbuild -ta trang-YYYYMMDD.tar.gz
jing-trang-20181222+dfsg2/gcj/rpmmacros 0000664 0000000 0000000 00000000440 13520105541 0017501 0 ustar 00root root 0000000 0000000 %_rpmdir %{_jingbuilddir}/dist/gcj
%_srcrpmdir %{_jingbuilddir}/dist/gcj
%_specdir %{_jingbuilddir}/gcj-rpm
%_sourcedir %{_jingbuilddir}/gcj-rpm
%_builddir %{_jingbuilddir}/gcj-rpm
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%packager James Clark
jing-trang-20181222+dfsg2/gcj/rpmrc 0000664 0000000 0000000 00000000335 13520105541 0016624 0 ustar 00root root 0000000 0000000 include: /usr/lib/rpm/rpmrc
macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/etc/rpm/macros.specspo:/etc/rpm/macros:/etc/rpm/%{_target}/macros:gcj/rpmmacros
optflags: i386 -O2 -march=i386 -mcpu=i686
jing-trang-20181222+dfsg2/gcj/rules.mk 0000664 0000000 0000000 00000002457 13520105541 0017250 0 ustar 00root root 0000000 0000000 all: $(PROG) test_$(PROG)
$(PROG): $(PROG).o $(RESOURCES)
$(GCJ) $(GCJFLAGS) $(LDFLAGS) --main=$(MAIN) -o $@ $(PROG).o $(RESOURCES) $(LIBS)
test_$(PROG): $(PROG).o $(RESOURCES)
$(GCJ) $(GCJFLAGS) $(LDFLAGS) --main=$(TEST_MAIN) -o $@ $(PROG).o $(RESOURCES) $(LIBS)
$(PROG).o: $(SOURCES)
$(GCJ) $(GCJFLAGS) -c -o $@ $(SOURCES)
.resource.o:
$(GCJ) $(GCJFLAGS) -c -o $@ --resource=`echo $@ | sed -e 's;src/;;' -e 's/.o$$//'` $<
$(RESOURCES): dirstamp
dirstamp:
for d in $(DIRS); do test -d $$d || mkdir $$d; done
@>$@
check: test_$(PROG)
cd test; $(MAKE)
install: $(PROG)
$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(srcdir)/mkinstalldirs $(DESTDIR)$(man1dir)
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(bindir)/$(PROG)
$(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(man1dir)/$(PROG).1
uninstall:
-rm -f $(DESTDIR)$(bindir)/$(PROG)
-rm -f $(DESTDIR)$(man1dir)/$(PROG).1
clean:
-rm -f dirstamp $(PROG) $(PROG).o $(RESOURCES)
-rmdir `for d in $(DIRS); do echo $$d; done | sort -r`
cd test; $(MAKE) clean
$(srcdir)/configure: configure.ac
cd $(srcdir) && autoconf
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
distclean: clean
-rm -f config.status config.cache config.log
.SUFFIXES: .resource
.PHONY: all check distclean clean install uninstall
jing-trang-20181222+dfsg2/gcj/test_jing.mk 0000664 0000000 0000000 00000004240 13520105541 0020074 0 ustar 00root root 0000000 0000000 srcdir=@srcdir@
XSLTPROC=xsltproc
check: spec-check mns-check nrl-check xsd-check
spec-check: spec-split/stamp
../test_jing spec-test.log spec-split
spec-prepped.xml: $(srcdir)/spectest.xml $(srcdir)/prep.xsl
$(XSLTPROC) -o $@ --stringparam dir spec-split $(srcdir)/prep.xsl $(srcdir)/spectest.xml 2>/dev/null
spec-split/stamp: spec-prepped.xml $(srcdir)/exslt.xsl
-mkdir spec-split
-mkdir `$(XSLTPROC) $(srcdir)/dir.xsl spec-prepped.xml 2>/dev/null`
$(XSLTPROC) $(srcdir)/exslt.xsl spec-prepped.xml 2>/dev/null
@>$@
mns-check: mns-split/stamp
../test_jing mns-test.log mns-split
mns-prepped.xml: $(srcdir)/mnstest.xml $(srcdir)/prep.xsl
$(XSLTPROC) -o $@ --stringparam dir mns-split $(srcdir)/prep.xsl $(srcdir)/mnstest.xml 2>/dev/null
mns-split/stamp: mns-prepped.xml $(srcdir)/exslt.xsl
-mkdir mns-split
-mkdir `$(XSLTPROC) $(srcdir)/dir.xsl mns-prepped.xml 2>/dev/null`
$(XSLTPROC) $(srcdir)/exslt.xsl mns-prepped.xml 2>/dev/null
@>$@
nrl-check: nrl-split/stamp
../test_jing nrl-test.log nrl-split
nrl-prepped.xml: $(srcdir)/nrltest.xml $(srcdir)/prep.xsl
$(XSLTPROC) -o $@ --stringparam dir nrl-split $(srcdir)/prep.xsl $(srcdir)/nrltest.xml 2>/dev/null
nrl-split/stamp: nrl-prepped.xml $(srcdir)/exslt.xsl
-mkdir nrl-split
-mkdir `$(XSLTPROC) $(srcdir)/dir.xsl nrl-prepped.xml 2>/dev/null`
$(XSLTPROC) $(srcdir)/exslt.xsl nrl-prepped.xml 2>/dev/null
@>$@
xsd-check: xsd-split/stamp
../test_jing xsd-test.log xsd-split
xsd-test-suite.xml: $(srcdir)/xsdtest.xml $(srcdir)/xsdtest.xsl
$(XSLTPROC) -o $@ $(srcdir)/xsdtest.xsl $(srcdir)/xsdtest.xml
xsd-prepped.xml: xsd-test-suite.xml $(srcdir)/prep.xsl
$(XSLTPROC) -o $@ --stringparam dir xsd-split $(srcdir)/prep.xsl xsd-test-suite.xml 2>/dev/null
xsd-split/stamp: xsd-prepped.xml $(srcdir)/exslt.xsl
-mkdir xsd-split
-mkdir `$(XSLTPROC) $(srcdir)/dir.xsl xsd-prepped.xml `
$(XSLTPROC) $(srcdir)/exslt.xsl xsd-prepped.xml 2>/dev/null
@>$@
clean:
-rm -fr spec-split spec-prepped.xml
-rm -fr xsd-split xsd-prepped.xml xsd-test-suite.xml
-rm -fr mns-split mns-prepped.xml mns-test-suite.xml
-rm -fr nrl-split nrl-prepped.xml nrl-test-suite.xml
.PHONY: clean check spec-check xsd-check mns-check nrl-check
jing-trang-20181222+dfsg2/gcj/test_trang.mk 0000664 0000000 0000000 00000002512 13520105541 0020260 0 ustar 00root root 0000000 0000000 srcdir=@srcdir@
XSLTPROC=xsltproc
FIXCR=sed -e "s/`echo x | tr x '\015'`/\\&\#xD;/g"
check: compact-check xsd-check
compact-check: compact-split/stamp
../test_trang xsd.log compact-split xml
xsd-check: xsd-split/stamp
../test_trang compact.log xsd-split xsd
compact-prepped.xml: $(srcdir)/compacttest.xml $(srcdir)/prep.xsl
$(XSLTPROC) --stringparam dir compact-split $(srcdir)/prep.xsl $(srcdir)/compacttest.xml | $(FIXCR) >$@
compact-split/stamp: compact-prepped.xml $(srcdir)/exslt.xsl $(srcdir)/dir.xsl
-mkdir `$(XSLTPROC) $(srcdir)/dir.xsl compact-prepped.xml`
$(XSLTPROC) $(srcdir)/exslt.xsl compact-prepped.xml
@for f in compact-split/*/xml/c.rng; do \
$(FIXCR) $$f >tem; mv tem $$f; \
done
# Work around another bug in xsltproc
@f=`grep -l ' foo="val"' compact-split/*/xml/c.rng`; \
if [ -f "$$f" ] ; then \
sed -e 's/ foo=/ rng:foo=/' $$f >tem; mv tem $$f; \
fi
@>$@
xsd-prepped.xml: $(srcdir)/toxsdtest.xml $(srcdir)/prep.xsl
$(XSLTPROC) -o $@ --stringparam dir xsd-split $(srcdir)/prep.xsl $(srcdir)/toxsdtest.xml
xsd-split/stamp: xsd-prepped.xml $(srcdir)/exslt.xsl $(srcdir)/dir.xsl
-mkdir `$(XSLTPROC) $(srcdir)/dir.xsl xsd-prepped.xml`
$(XSLTPROC) $(srcdir)/exslt.xsl xsd-prepped.xml
@>$@
clean:
-rm -fr compact-split xsd-split compact-prepped.xml xsd-prepped.xml
.PHONY: check xsd-check compact-check clean
jing-trang-20181222+dfsg2/gcj/todo.txt 0000664 0000000 0000000 00000000315 13520105541 0017262 0 ustar 00root root 0000000 0000000 Sign RPM file
Detect with -lpthread is needed
Instead of removing unneeded sources, omit them from compile list.
Include some examples and additional documentation in the dist.
Include regex-test in jing.
jing-trang-20181222+dfsg2/gcj/trang.1 0000664 0000000 0000000 00000005344 13520105541 0016760 0 ustar 00root root 0000000 0000000 .TH trang 1 @VERSION@
.SH NAME
trang \- convert between different schema languages for XML
.SH SYNOPSIS
.B trang
.RB [ \-I
.BR rng | rnc | dtd | xml ]
.RB [ \-O
.BR rng | rnc | dtd | xsd ]
.RB [ \-i
.IR input-param ]
.RB [ \-o
.IR output-param ]
.IR input-file " ..."
.I output-file
.SH DESCRIPTION
.B trang
takes as input a schema written in any of the following formats:
.IP
RELAX NG (XML syntax)
.IP
RELAX NG (compact syntax)
.IP
XML 1.0 DTD
.PP
and produces as output a schema written in any of the following formats:
.IP
RELAX NG (XML syntax)
.IP
RELAX NG (compact syntax)
.IP
XML 1.0 DTD
.IP
W3C XML Schema
.PP
Trang can also infer a schema from one or more example XML
documents.
.PP
Trang uses an internal representation based on RELAX NG. For each
supported input format, there is an input module that converts a
schema in that input format into this internal representation. For
each supported output format, there is an output module that converts
the internal representation into a schema in that output format.
Thus, any supported input format can be translated to any supported
output format.
.PP
Trang requires two command-line arguments: the first is the URI or
filename of the schema to be translated; the second is the output
filename.
.PP
Trang infers the input and output modules to be used from the
extension of input and output filenames as follows:
.TP
.B .rng
RELAX NG (XML syntax)
.TP
.B .rnc
RELAX NG (compact syntax)
.TP
.B .dtd
XML 1.0 DTD
.TP
.B .xsd
W3C XML Schema
.TP
.B .xml
XML documents (used as examples from which to infer a schema)
.PP
This inference can be overridden using the
.B \-I
and
.B \-O
options.
.LP
When the input is XML documents used as examples to infer a schema,
more than one input file may be specified as arguments. All the input
files are specified before the output file.
.SH OPTIONS
.TP
.BR "\-I rng" | rnc | dtd | xml
Specifies which input module to use.
.TP
.BR "\-O rng" | rnc | dtd | xsd
Specifies which output module to use.
.TP
.BI \-i " input-param"
.TP
.BI \-o " output-param"
Specifies a parameter for an input
.RB ( \-i )
or output
.RB ( \-o )
module.
The
.B \-i
and
.B \-o
options may be used multiple times in order to specify
multiple parameters. There are two kinds of parameter: boolean
parameters and string-valued parameters. A string-valued parameter is
specified using the form
.IB name = value\fR.
A boolean parameter is
specified using the form
.I name
or
.BI no- name\fR.
The applicable parameters depend on
the particular input and output module.
For details, see the HTML documentation.
.SH "SEE ALSO"
.BR jing (1)
.LP
Trang Manual
.PP
http://relaxng.org
.SH AUTHOR
James Clark (jjc@jclark.com)
.PP
This product includes software developed by the
Apache Software Foundation (http://www.apache.org/).
jing-trang-20181222+dfsg2/gcj/trang.spec 0000664 0000000 0000000 00000003263 13520105541 0017550 0 ustar 00root root 0000000 0000000 Summary: Multi-format schema converter based on RELAX NG.
Name: trang
Version:
Release: 1
URL: http://www.thaiopensource.com/relaxng/
Source: %{name}-%{version}.tar.gz
License: BSD
Group: Applications/Text
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: gcc-java >= 3.2-7
%description
Trang converts between different schema languages for XML. It
supports the following languages: RELAX NG (both XML and compact
syntax), XML 1.0 DTDs, W3C XML Schema. A schema written in any of the
supported schema languages can be converted into any of the other
supported schema languages, except that W3C XML Schema is supported
for output only, not for input.
Trang can also infer a schema from one or more example XML documents.
Trang is constructed around an RELAX NG object model designed to
support schema conversion. For each schema language supported for
input, there is an input module that can convert from the schema
language into this internal object model. Similarly, for each schema
language supported for output, there is an output module that can
convert from the internal object model in the schema language.
Trang aims to produce human-understandable schemas; it tries for a
translation that preserves all aspects of the input schema that may be
significant to a human reader, including the definitions, the way the
schema is divided into files, annotations and comments.
%prep
%setup -q
%build
%configure GCJFLAGS="${GCJFLAGS:-%optflags}"
make
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_bindir}/trang
%{_mandir}/man1/trang.1*
%doc trang-manual.html
%changelog
* Sat Feb 22 2003 James Clark
- Initial build.
jing-trang-20181222+dfsg2/gcj/vars.mk 0000664 0000000 0000000 00000000535 13520105541 0017064 0 ustar 00root root 0000000 0000000 SHELL=/bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
man1dir = $(mandir)/man1
GCJ=@GCJ@
GCJFLAGS=@GCJFLAGS@
LDFLAGS=@LDFLAGS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
PROG=@PROG@
MAIN=@MAIN@
TEST_MAIN=@TEST_MAIN@
LIBS=@LIBS@
jing-trang-20181222+dfsg2/iml.xsl 0000664 0000000 0000000 00000003100 13520105541 0016315 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/jing-trang.ipr 0000664 0000000 0000000 00000070154 13520105541 0017575 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/jing.bat 0000775 0000000 0000000 00000002312 13520105541 0016432 0 ustar 00root root 0000000 0000000 @echo off
setlocal
set MAIN_CLASS=com.thaiopensource.relaxng.util.Driver
set JAR_FILE=jing.jar
set JAVA_PROBLEM_EXIT_CODE=1
set JRE_KEY=HKLM\SOFTWARE\JavaSoft\Java Runtime Environment
set JAVA_VERSION=unknown
if not exist "%JAVA_HOME%\bin\java.exe" (
for /f "tokens=2* skip=2" %%u in ('reg query "%JRE_KEY%" /v CurrentVersion') do for /f "tokens=2* skip=2" %%i in ('reg query "%JRE_KEY%\%%v" /v JavaHome') do (
set JAVA_VERSION=%%v
set JAVA_HOME=%%j
)
) 2>nul
if exist "%JAVA_HOME%\bin\java.exe" goto found_java
echo Could not find a Java Runtime Environment. Download one from http://java.sun.com/javase/downloads/.
exit /b %JAVA_PROBLEM_EXIT_CODE%
:found_java
if not x1.4==x%JAVA_VERSION% if not x1.3==x%JAVA_VERSION% goto java_version_ok
echo Version 5.0 or newer of the Java Runtime Environment is required. Download one from http://java.sun.com/javase/downloads/.
exit /b %JAVA_PROBLEM_EXIT_CODE%
:java_version_ok
set JAR_DIR=%~dp0
if exist "%JAR_DIR%%JAR_FILE%" goto found_jar
echo Could not find %JAR_FILE%. Must be in the same directory as %~nx0 (%JAR_DIR%).
exit /b %JAVA_PROBLEM_EXIT_CODE%
:found_jar
"%JAVA_HOME%\bin\java.exe" -classpath "%JAR_DIR%%JAR_FILE%" %MAIN_CLASS% %*
jing-trang-20181222+dfsg2/maven-jing.xml 0000664 0000000 0000000 00000012131 13520105541 0017565 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/maven-trang.xml 0000664 0000000 0000000 00000011651 13520105541 0017757 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/mod/ 0000775 0000000 0000000 00000000000 13520105541 0015571 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/ 0000775 0000000 0000000 00000000000 13520105541 0017203 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/mod.xml 0000664 0000000 0000000 00000000245 13520105541 0020505 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/mod/catalog/src/ 0000775 0000000 0000000 00000000000 13520105541 0017772 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/ 0000775 0000000 0000000 00000000000 13520105541 0020716 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/ 0000775 0000000 0000000 00000000000 13520105541 0021474 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/ 0000775 0000000 0000000 00000000000 13520105541 0024524 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/resolver/ 0000775 0000000 0000000 00000000000 13520105541 0026365 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/resolver/catalog/ 0000775 0000000 0000000 00000000000 13520105541 0027777 5 ustar 00root root 0000000 0000000 CatalogEntityResolver.java 0000664 0000000 0000000 00000002306 13520105541 0035055 0 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/resolver/catalog package com.thaiopensource.resolver.catalog;
import org.apache.xml.resolver.helpers.BootstrapResolver;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import java.io.IOException;
import java.net.URL;
/**
* An EntityResolver for use when parsing catalogs.
*/
class CatalogEntityResolver implements EntityResolver {
private final EntityResolver entityResolver;
CatalogEntityResolver(EntityResolver entityResolver) {
this.entityResolver = entityResolver;
}
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
if (BootstrapResolver.xmlCatalogPubId.equals(publicId)
|| BootstrapResolver.xmlCatalogSysId.equals(systemId)) {
URL url = BootstrapResolver.class.getResource("/org/apache/xml/resolver/etc/catalog.dtd");
if (url != null) {
InputSource in = new InputSource(url.toString());
// Avoid any weirdness the parser may perform on URLs
in.setByteStream(url.openStream());
in.setPublicId(publicId);
return in;
}
}
if (entityResolver != null)
return entityResolver.resolveEntity(publicId, systemId);
return null;
}
}
CatalogResolver.java 0000664 0000000 0000000 00000006217 13520105541 0033665 0 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/resolver/catalog package com.thaiopensource.resolver.catalog;
import com.thaiopensource.resolver.AbstractResolver;
import com.thaiopensource.resolver.BasicResolver;
import com.thaiopensource.resolver.Identifier;
import com.thaiopensource.resolver.Input;
import com.thaiopensource.resolver.Resolver;
import com.thaiopensource.resolver.ResolverException;
import com.thaiopensource.resolver.xml.ExternalDTDSubsetIdentifier;
import com.thaiopensource.resolver.xml.ExternalEntityIdentifier;
import com.thaiopensource.resolver.xml.ExternalIdentifier;
import com.thaiopensource.resolver.xml.sax.SAXResolver;
import org.apache.xml.resolver.Catalog;
import java.io.IOException;
import java.util.List;
/**
* A Resolver that uses OASIS XML catalogs.
*/
public class CatalogResolver extends AbstractResolver {
private final Catalog catalog;
private boolean catalogLoaded = false;
private boolean hadCatalogError = false;
// Allow somebody to customize in a different way, but still use our resolve logic.
public CatalogResolver(Catalog catalog) {
this.catalog = catalog;
}
public CatalogResolver(List catalogUris, SAXResolver resolver) {
this(new OasisCatalog(new SimpleCatalogManager(catalogUris), resolver));
}
public CatalogResolver(List catalogUris, Resolver resolver) {
this(catalogUris, new SAXResolver(resolver));
}
public CatalogResolver(List catalogUris) {
this(catalogUris, new SAXResolver());
}
public synchronized void resolve(Identifier id, Input input) throws IOException, ResolverException {
if (input.isResolved())
return;
if (hadCatalogError)
return;
String absoluteUri = null;
try {
absoluteUri = BasicResolver.resolveUri(id);
if (id.getUriReference().equals(absoluteUri))
absoluteUri = null;
}
catch (ResolverException e) {
// ignore
}
String resolved = null;
boolean isExternalIdentifier = (id instanceof ExternalIdentifier);
try {
if (!catalogLoaded) {
catalogLoaded = true;
catalog.loadSystemCatalogs();
}
if (absoluteUri != null)
resolved = isExternalIdentifier ? catalog.resolveSystem(absoluteUri) : catalog.resolveURI(absoluteUri);
if (resolved == null) {
if (!isExternalIdentifier)
resolved = catalog.resolveURI(id.getUriReference());
else if (id instanceof ExternalEntityIdentifier) {
ExternalEntityIdentifier xid = (ExternalEntityIdentifier)id;
resolved = catalog.resolveEntity(xid.getEntityName(), xid.getPublicId(), xid.getUriReference());
}
else if (id instanceof ExternalDTDSubsetIdentifier) {
ExternalDTDSubsetIdentifier xid = (ExternalDTDSubsetIdentifier)id;
resolved = catalog.resolveDoctype(xid.getDoctypeName(), xid.getPublicId(), xid.getUriReference());
}
else {
ExternalIdentifier xid = (ExternalIdentifier)id;
resolved = catalog.resolvePublic(xid.getPublicId(), xid.getUriReference());
}
}
}
catch (ResolverIOException e) {
hadCatalogError = true;
throw e.getResolverException();
}
if (resolved != null)
input.setUri(resolved);
}
}
jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/resolver/catalog/OasisCatalog.java0000664 0000000 0000000 00000004357 13520105541 0033224 0 ustar 00root root 0000000 0000000 package com.thaiopensource.resolver.catalog;
import com.thaiopensource.resolver.ResolverException;
import com.thaiopensource.resolver.xml.XMLDocumentIdentifier;
import com.thaiopensource.resolver.xml.sax.SAXResolver;
import com.thaiopensource.xml.sax.DraconianErrorHandler;
import org.apache.xml.resolver.Catalog;
import org.apache.xml.resolver.CatalogManager;
import org.apache.xml.resolver.readers.OASISXMLCatalogReader;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import javax.xml.transform.sax.SAXSource;
import java.io.IOException;
import java.net.URL;
/**
* A catalog with customized parsing of catalog files. In particular, it only supports
* OASIS XML Catalogs and it uses a SAXResolver for access to the catalog URIs.
*/
class OasisCatalog extends Catalog {
private final SAXResolver saxResolver;
OasisCatalog(CatalogManager catalogManager, SAXResolver saxResolver) {
super(catalogManager);
this.saxResolver = saxResolver;
// don't call setupReaders; since we use our own parseCatalogFile
// we'll load the catalogs lazily
}
protected void parseCatalogFile(String uri) throws IOException {
OASISXMLCatalogReader catalogReader = new OASISXMLCatalogReader();
try {
SAXSource source = saxResolver.resolve(new XMLDocumentIdentifier(uri, null, OASISXMLCatalogReader.namespaceName));
String systemId = source.getInputSource().getSystemId();
if (systemId == null)
systemId = uri;
base = new URL(systemId);
catalogReader.setCatalog(this);
XMLReader xmlReader = source.getXMLReader();
xmlReader.setEntityResolver(new CatalogEntityResolver(xmlReader.getEntityResolver()));
xmlReader.setContentHandler(catalogReader);
xmlReader.setErrorHandler(new DraconianErrorHandler());
xmlReader.parse(source.getInputSource());
}
catch (SAXException e) {
Exception wrapped = e.getException();
// this will get unwrapped by CatalogResolver
throw new ResolverIOException(wrapped instanceof ResolverException
? (ResolverException)wrapped
: new ResolverException(e));
}
}
protected Catalog newCatalog() {
return new OasisCatalog(catalogManager, saxResolver);
}
}
ResolverIOException.java 0000664 0000000 0000000 00000001040 13520105541 0034466 0 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/resolver/catalog package com.thaiopensource.resolver.catalog;
import com.thaiopensource.resolver.ResolverException;
import java.io.IOException;
/**
* A wrapper for a ResolverException to allow it to be passed up by the catalog parser.
*/
public class ResolverIOException extends IOException {
private final ResolverException resolverException;
public ResolverIOException(ResolverException resolverException) {
this.resolverException = resolverException;
}
public ResolverException getResolverException() {
return resolverException;
}
}
SimpleCatalogManager.java 0000664 0000000 0000000 00000001764 13520105541 0034612 0 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/main/com/thaiopensource/resolver/catalog package com.thaiopensource.resolver.catalog;
import org.apache.xml.resolver.CatalogManager;
import java.util.List;
import java.util.Vector;
/**
* A very simple CatalogManager that does not use use property file/system property customization.
*/
class SimpleCatalogManager extends CatalogManager {
private final Vector catalogUris;
SimpleCatalogManager(List catalogUris) {
this.catalogUris = new Vector();
this.catalogUris.addAll(catalogUris);
// disable printing to System.out
setVerbosity(0);
}
public Vector getCatalogFiles() {
return catalogUris;
}
public boolean getRelativeCatalogs() {
return false;
}
public boolean getPreferPublic() {
return true;
}
public boolean getIgnoreMissingProperties() {
return true;
}
public boolean getAllowOasisXMLCatalogPI() {
return false;
}
public boolean getUseStaticCatalog() {
return false;
}
public String getCatalogClassName() {
return null;
}
}
jing-trang-20181222+dfsg2/mod/catalog/src/test/ 0000775 0000000 0000000 00000000000 13520105541 0020751 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/test/com/ 0000775 0000000 0000000 00000000000 13520105541 0021527 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/test/com/thaiopensource/ 0000775 0000000 0000000 00000000000 13520105541 0024557 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/test/com/thaiopensource/resolver/ 0000775 0000000 0000000 00000000000 13520105541 0026420 5 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/test/com/thaiopensource/resolver/catalog/ 0000775 0000000 0000000 00000000000 13520105541 0030032 5 ustar 00root root 0000000 0000000 CatalogResolverTest.java 0000664 0000000 0000000 00000002537 13520105541 0034561 0 ustar 00root root 0000000 0000000 jing-trang-20181222+dfsg2/mod/catalog/src/test/com/thaiopensource/resolver/catalog package com.thaiopensource.resolver.catalog;
import com.thaiopensource.resolver.Input;
import com.thaiopensource.resolver.Resolver;
import com.thaiopensource.resolver.ResolverException;
import com.thaiopensource.resolver.xml.ExternalIdentifier;
import com.thaiopensource.resolver.xml.sax.SAXResolver;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Tests CatalogResolver.
*/
public class CatalogResolverTest {
@Test
public void testResolve() throws IOException, ResolverException {
List catalogs = new ArrayList();
catalogs.add(resourceUri("catalog.xml"));
Resolver resolver = new CatalogResolver(catalogs, new SAXResolver(null));
ExternalIdentifier xid = new ExternalIdentifier("foo.xml", "http://www.example.com/index.html", "The Great Foo");
Input input = new Input();
resolver.resolve(xid, input);
Assert.assertEquals(input.getUri(), "http://www.example.com/bar.xml");
}
static String resourceUri(String fileName) {
String className = CatalogResolverTest.class.getName();
int dotIndex = className.lastIndexOf('.');
String resourceName = className.substring(0, dotIndex + 1).replace('.', '/') + fileName;
return CatalogResolverTest.class.getClassLoader().getResource(resourceName).toString();
}
}
jing-trang-20181222+dfsg2/mod/catalog/src/test/com/thaiopensource/resolver/catalog/catalog.xml 0000664 0000000 0000000 00000000402 13520105541 0032162 0 ustar 00root root 0000000 0000000
jing-trang-20181222+dfsg2/mod/catalog/src/test/com/thaiopensource/resolver/catalog/catalog2.xml 0000664 0000000 0000000 00000000443 13520105541 0032251 0 ustar 00root root 0000000 0000000