You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Nicholas Taylor <Ni...@msdw.com> on 2001/01/22 10:37:01 UTC

Simple decision process within a schema

Hi,

I'm not sure whether this is the correct forum, but here goes. I would
like to be able to use a schema that will allow me to make decisions on
the content of an xml message depending on the values of certain fields.

For example:
If I have a message that consists of:
<Message>
  <field 1/>
  <field 2/>
  <field 3/>
</Message>

where <field 1/> would be an enumeration that could only contain A or X.

If <field 1> contains an A, I would like both <field 2> & <field 3> to
be mandatory.  If <field 1> contains an X, then <field 2> is still
mandatory and <field 3> is optional.
Is it possible to construct a schema that would allow you to perform
such a function?

Thanks,

Nicholas Taylor


DocumentBuilder-Problem

Posted by Erik Zimmermann <ez...@pironet.com>.
Hi Everybody,
I m having a problem with a very simple piece of code. It throws an
exception which I cant explain.
Does anybody has an idea? (I didnt include the whole code...)


import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

{
    System.out.println("Line 1");
        DocumentBuilderFactory docBuilderFactory =
DocumentBuilderFactory.newInstance();
    System.out.println("Line 2");
        DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();

    System.out.println("Line 3");
}

Line 1
Line 2
java.lang.SecurityException: sealing violation
 at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$100(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)



thanks...
--
Erik Zimmermann - Junior Consultant - CC-Developer
Josef-Lammerting-Allee 14-18
50933 Cologne - Germany
mailto:ezimmermann@pironet.com