> Sandy wrote...
>
> In Xerces2, I'm leaning toward having an XSWildcardDecl class to hold the
> wildcard information. And other decl classes (XSParticleDecl,
> XSAttributeGroup, XSComplexTypeDecl, etc.) will refer to objects of this
> wildcard decl class. So that the code of processing wildcards is
> centralized, which results in a cleaner design.
>
> Here is my proposed wildcard decl class. What do you think?
>
> /**
> * Store wildcard information.
> *
> * @author Sandy Gao, IBM
> * @version $Id$
> */
> public class XSWildcardDecl {
>
> /** Wildcard namespace="##any". */
> public static final short WILDCARD_ANY = 0;
>
> /** Wildcard namespace="##other". */
> public static final short WILDCARD_OTHER = 1;
>
> /** Wildcard namespace=list of anyURI | ##targetNamespace | ##local. */
> public static final short WILDCARD_LIST = 2;
>
> /** Wildcard processContents="strict". */
> public static final short WILDCARD_STRICT = 0;
>
> /** Wildcard processContents="lax". */
> public static final short WILDCARD_LAX = 1;
>
> /** Wildcard processContents="skip". */
> public static final short WILDCARD_SKIP = 2;
>
> // the type of wildcard: any, other, or list
> public short fType = WILDCARD_ANY;
>
> // the type of process contents: strict, lax, or skip
> public short fPprocessContents = WILDCARD_STRICT;
>
> // the namespace list:
> // for WILDCARD_LIST, it means one of the namespaces in the list
> // for WILDCARD_OTHER, it means not any of the namespaces in the list
> public String[] fNamespaceList;
> } // class XSWildcardDecl
>
This seems better.
But, if fType = WILDCARD_OTHER, this implies any namespace other than
targetNamespace. Then there is no need to keep a list of namespaces for this
case, as mentioned in the w3c schema structures.
Can you explain why you have done this?.
Cheers,
Rahul.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]