Java Code Examples for org.apache.xerces.xs.XSWildcard#getProcessContents()
The following examples show how to use
org.apache.xerces.xs.XSWildcard#getProcessContents() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XmlTypeToJsonSchemaConverter.java From iaf with Apache License 2.0 | 6 votes |
private void handleWildcard(XSWildcard wildcard){ String processContents; switch (wildcard.getProcessContents()) { case XSWildcard.PC_LAX: processContents="LAX"; break; case XSWildcard.PC_SKIP: processContents="SKIP"; break; case XSWildcard.PC_STRICT: processContents="STRICT"; break; default: throw new IllegalStateException("handleWildcard wildcard.processContents is not PC_LAX, PC_SKIP or PC_STRICT, but ["+wildcard.getProcessContents()+"]"); } String namespaceConstraint; switch (wildcard.getConstraintType()) { case XSWildcard.NSCONSTRAINT_ANY : namespaceConstraint="ANY"; break; case XSWildcard.NSCONSTRAINT_LIST : namespaceConstraint="SKIP "+wildcard.getNsConstraintList(); break; case XSWildcard.NSCONSTRAINT_NOT : namespaceConstraint="NOT "+wildcard.getNsConstraintList(); break; default: throw new IllegalStateException("handleWildcard wildcard.namespaceConstraint is not ANY, LIST or NOT, but ["+wildcard.getConstraintType()+"]"); } }
Example 2
Source File: CMXSDElementDeclaration.java From lemminx with Eclipse Public License 2.0 | 5 votes |
/** * Returns the value of the xs:any/@processContents if the given element is a * xs:any and {@link #PC_UNKWOWN} otherwise. * * @param declaration the element, wildcard declaration. * @return the value of the xs:any/@processContents if the given element is a * xs:any and {@link #PC_UNKWOWN} otherwise. */ private static short getXSAnyProcessContents(Object declaration) { if (declaration instanceof XSWildcard) { XSWildcard wildcard = (XSWildcard) declaration; if ((wildcard.getConstraintType() == XSWildcard.NSCONSTRAINT_ANY)) { return wildcard.getProcessContents(); } } return PC_UNKWOWN; }