You put the xerces jars in the "endorsed overrides" directory.
https://docs.oracle.com/javase/8/docs/technotes/guides/standards/
On Tue, Dec 5, 2017 at 1:18 PM, Mark Raynsford <
list+org.apache.xer...@io7m.com> wrote:
> Hello.
>
> Is it possible to use Xerces in a (modular) JDK 9 project?
>
> I'
I am mainly familiar with XML Schema 1.0, so it's possible my assertions
below have been supplanted in 1.1.
The purpose of a schema is to declare the contents of a single namespace,
the target namespace, which is declared on the 'schema' element.
Constructs of another namespace cannot be declared
One possibility is that the .dtd URI referred to in the DOCTYPE is being
loaded from the web. You can make a local copy and register it in an
XML catalog or otherwise provide it to a custom LSResourceResolver in
the DOMConfiguration attached to the LSParser. (Even if not validating
against the DT
Would it be sufficient to specify your DOM's Document implementation
class to the JAXP DocumentBuilderFactory using the factory's
setAttribute method? See the first example here:
http://xerces.apache.org/xerces2-j/properties.html
On 9/27/2012 1:25 PM, Dominik Rauch wrote:
> Hello Xerces-List!
When using the Xerces 2.8.1 XML Schema API, the derived type from this
schema:
http://www.w3.org/2001/XMLSchema";
targetNamespace="urn:webalo:try-extension"
xmlns:tns="urn:webalo:try-extension">
try putting the Xerces 2.9.1 jars in $TOMCAT_HOME/common/lib or
.../endorsed (depends on version of Tomcat).
Jeff
Benson Margulies wrote:
My immediate problem is that I don't have an adequate characterization
of my problem.
If I run a test in a plain old java object with no explicit Xerces
You probably need to put Xerces into the Tomcat lib directory, or some
other directory that serves as an "endorsed" override to the JDK's
version (or some other JAXP that gets loaded before your webapp).
In different appservers, there are different conventions for whether the
container's class
You can put any URI you want into the location attribute on import or
include, and resolve it from schemas held in strings or relational
databases or resources in a jar file or anything else, if you provide
an EntityResolver to the parser. See
DocumentBuilder.setEntityResolver().
You can also use
Sorry to reply to my own post, but I forgot to mention that from the
XSElementDeclaration you can get its enclosing complex type definition
(using getEnclosingCTDefinition()) and from there work back to the
particle for the element declaration.
Jeff
On Sun, Jun 28, 2009 at 6:36 PM, Jeff Greif
>From the ElementPSVI on the root of the document, you can get the
XSModel using getSchemaInformation. From there you can work your way
through the complex type definition to the XSParticle whose term is
the XSElementDeclaration in question, and get access to the
max/minOccurs info.
Jeff
On Sun,
I think you have two problems here, a network handling problem and an
XML parsing problem. The options you describe are by no means the
only ones. In particular, you don't need a thread per request;
however, you do need an XML parser exclusively handling each single
document if you are using Xerc
t version
> (2.9.1) but don't recall that there was any issue with 2.8.1. Perhaps
> there's something you're doing that you haven't mentioned here. A snippet of
> your code might help.
>
> Thanks.
>
> Michael Glavassevich
> XML Parser Development
> IBM To
e
problem before the parsed XML is passed to the deserializer.
Jeff
Nathan Beyer wrote:
Check out the PSVI API [1] - Post-Schema-Validation-Infoset
[1] http://xerces.apache.org/xerces2-j/faq-xs.html
On Tue, May 13, 2008 at 2:56 PM, Jeff Greif
<[EMAIL PROTECTED] <mailto:[EMAIL PRO
How can the Xerces parser be directed to insert attributes, specified
in XML Schema to have default values, into a DOM during parsing when
the attributes are not present in the input source? Presumably
schema-validation must be turned on, but apparently some other setting
is needed. The default a
If you have a pretty good idea of the set of schemas that will be
needed before reading the instance documents, you could preparse those
schemas into a GrammarPool associated with the instance document
parser. That way, most or all of the documents could be validated as
they are read (the first ti
If I recall correctly, the model group for B should contain a sequence
with the two elements a,b. That is, the complex type definition for B
already has the process of extending A built into its content model.
Jeff
On 11/22/07, Srdjan Djuricic <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a si
The components that are accessible from model.getComponents() are those
at top-level in the schema, the global elements and named type
definitions (children of the xs:schema element). You asked only for the
complex type definitions (the named ones), not also for the global
elements. If you as
Thanks much, Michael. XSGrammar should do the trick.
Jeff
On 10/18/07, Michael Glavassevich <[EMAIL PROTECTED]> wrote:
> Hi Jeff,
>
> Jeff Greif <[EMAIL PROTECTED]> wrote on 10/18/2007 01:01:25 PM:
>
> > Xerces-J has the very useful feature of GrammarPools, caching
Xerces-J has the very useful feature of GrammarPools, caching
SchemaGrammars (and other Grammars) for use in parsing. However, in
recent versions, SchemaGrammar has been marked as an internal class
subject to removal. The DOM Level 3 Load and Save XSModel class seems
to be in some ways simila
2.9.0 today to
> test any changes!
>
> Jeff, can you bear with me here I think I understand you...
>
> Jeff Greif wrote:
> > Maybe an example will be clearer.
> >
> > The instance document is, relative to some subtree of the file system, in
> >
> &g
ccessfully, but only because the
paths work whether the reference is from the instance doc or a schema
doc.
Jeff
On 10/8/07, Chris Bray <[EMAIL PROTECTED]> wrote:
> Jeff.
>
> My comments inline.
>
> Chris
>
> Jeff Greif wrote:
> > When a relative URL is u
When a relative URL is used for the location of an imported schema, it
is supposed to be relative to the URL of the importing document. So
if your instance document directly references the namespaces of one or
more schemas for validation, whose URLs are interpreted relative to
the location of the
Doesn't this discussion hinge on what confers IDness?
Among the various possibilities are these:
1. You're copying nodes from a namespace-aware document conforming to
a schema which defines certain attributes as having type ID, into a
document governed by the same schema or one which imports th
The schema spec requires that all parts of a schema from the target
namespace of a given schema be present in that schema document or
d. A location is required in the element because
there may be more than one. The normal externalSchemaLocation
mechanism would not allow multiple items for the s
Add
elementFormDefault="qualified"
to the xsd:schema element in schema a to get the behavior you were
expecting. This menas that elements declared within a complexType
definition are in the target namespace of the schema. This attribute
has the default value "unqualified", meaning such elem
You've told the validator (in the xmlns=... atttribute) that the
element personnel is in namespace n1, and you've told it where to find
the schema for namespace n2 (in the schemaLocation attribute). Since
you haven't told it where to find the schema for n1, there is no
declaration available for
Take a look at:
http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040122/
An XSParticle has an XSTerm (accessed via getTerm) which is either an
XSElementDeclaration or an XSWildcard or an XSModelGroup (sequence,
choice or all).
It helps to read the above spec in conjunction with the XML Sch
Your schema needs to say elementFormDefault="qualified" in the
element.
Scott Shaver wrote:
=
ERROR
==
[java] Thu Apr 20 13:55:00 MDT 2006
RiverbedShipmentSubscriberMDB.validateSchema(): XML failed
validation:cvc-complex-type.2.4.a: Invalid
When you use xsi:schemaLocation, the value should match the pattern
"namespace-uri whitespace schema-url" repeated as many times as
necessary for all the schemas to be found, and with whitespace
separating the groups.
This also applies the to "http://apache.org/xml/properties/schema/external-
sche
A hunch: It's possible that you need to tell Xerces to
"normalize-space" so that the whitespace after the shippingRequestTag
is not treated as content, making it appear that your instance
document does not match the content model. See the docs for how to do
this in that version of Xerces, which is
Just speculating, but the fact that this occurs in a security manager
suggests that this is designed as a denial of service protection (for
example by having a recursive entity expansion that turns a small
input string into an infinitely large thing to be parsed). It is
unlikely to have anything t
If no nodes are being altered by any thread, and
deferred-node-expansion is turned off, is the xerces DOM concurrently
accessible from multiple threads?
Jeff
On 3/7/06, Joseph Kesselman <[EMAIL PROTECTED]> wrote:
> >The FAQ[1], declares xerces DOM implementation is not thread safe.
>
> Most DOMs
It's not an xml comment! It's the serialized form of a Text node that's
the next sibling of the element. Having
non-whitespace text might make the document invalid with respect to its
defined grammar (DTD or XML Schema or something else), but perhaps it is
not being validated.
Jeff
Richar
I think this will happen automatically if the parser is configured to
use the grammar pool holding the imported grammar. Look at the Xerces
"Grammars" FAQ for more details.
Jeff
Guy Sharon wrote:
How do I set the preparser to choose to look first in the GrammarPool
and only then to look for
As a matter of specification, to be valid itself, a schema must import all
the namespaces it references. In the element it need not specify
where to find the imported schema, and if it does specify it, the
specification may be ignored by a validator that can access the grammar
another way.
A
35 matches
Mail list logo