public Expression simplify(ExpressionVisitor visitor) throws XPathException { elementName = visitor.simplify(elementName); namespace = visitor.simplify(namespace); Configuration config = visitor.getConfiguration(); setLazyConstruction(config.isLazyConstructionMode()); preservingTypes |= !config.isSchemaAware(Configuration.XML_SCHEMA); if (getSchemaType() != null) { itemType = new ContentTypeTest(Type.ELEMENT, getSchemaType(), config); getSchemaType().analyzeContentExpression(content, Type.ELEMENT, visitor.getStaticContext()); } else if (validation == Validation.STRIP || !config.isSchemaAware(Configuration.XML_SCHEMA)) { itemType = new ContentTypeTest(Type.ELEMENT, Untyped.getInstance(), config); } else { // paradoxically, we know less about the type if validation="strict" is specified! // We know that it won't be untyped, but we have no way of representing that. itemType = NodeKindTest.ELEMENT; } return super.simplify(visitor); }
public Expression simplify(ExpressionVisitor visitor) throws XPathException { elementName = visitor.simplify(elementName); namespace = visitor.simplify(namespace); Configuration config = visitor.getConfiguration(); setLazyConstruction(config.isLazyConstructionMode()); preservingTypes |= !config.isSchemaAware(Configuration.XML_SCHEMA); if (getSchemaType() != null) { itemType = new ContentTypeTest(Type.ELEMENT, getSchemaType(), config); getSchemaType().analyzeContentExpression(content, Type.ELEMENT, visitor.getStaticContext()); } else if (validation == Validation.STRIP || !config.isSchemaAware(Configuration.XML_SCHEMA)) { itemType = new ContentTypeTest(Type.ELEMENT, Untyped.getInstance(), config); } else { // paradoxically, we know less about the type if validation="strict" is specified! // We know that it won't be untyped, but we have no way of representing that. itemType = NodeKindTest.ELEMENT; } return super.simplify(visitor); }
public Expression simplify() throws XPathException { setNameExp(getNameExp().simplify()); if (getNamespaceExp() != null) { setNamespaceExp(getNamespaceExp().simplify()); } Configuration config = getConfiguration(); boolean schemaAware = getPackageData().isSchemaAware(); preservingTypes |= !schemaAware; final SchemaType schemaType = getSchemaType(); if (schemaType != null) { itemType = new ContentTypeTest(Type.ELEMENT, schemaType, config, false); schemaType.analyzeContentExpression(getContentExpression(), Type.ELEMENT); } else if (getValidationAction() == Validation.STRIP || !schemaAware) { itemType = new ContentTypeTest(Type.ELEMENT, Untyped.getInstance(), config, false); } else { // paradoxically, we know less about the type if validation="strict" is specified! // We know that it won't be untyped, but we have no way of representing that. itemType = NodeKindTest.ELEMENT; } return super.simplify(); }
public Expression simplify() throws XPathException { setNameExp(getNameExp().simplify()); if (getNamespaceExp() != null) { setNamespaceExp(getNamespaceExp().simplify()); } Configuration config = getConfiguration(); boolean schemaAware = getPackageData().isSchemaAware(); preservingTypes |= !schemaAware; final SchemaType schemaType = getSchemaType(); if (schemaType != null) { itemType = new ContentTypeTest(Type.ELEMENT, schemaType, config, false); schemaType.analyzeContentExpression(getContentExpression(), Type.ELEMENT); } else if (getValidationAction() == Validation.STRIP || !schemaAware) { itemType = new ContentTypeTest(Type.ELEMENT, Untyped.getInstance(), config, false); } else { // paradoxically, we know less about the type if validation="strict" is specified! // We know that it won't be untyped, but we have no way of representing that. itemType = NodeKindTest.ELEMENT; } return super.simplify(); }
new ContentTypeTest(Type.ELEMENT, schemaType, config)); try { schemaType.analyzeContentExpression(content, Type.ELEMENT, env); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1510" : "XQDY0027"); xsiType.analyzeContentExpression(content, Type.ELEMENT, env); try { config.checkTypeDerivationIsOK(xsiType, schemaType, 0); new ContentTypeTest(Type.ELEMENT, instr.getSchemaType(), config)); try { schemaType.analyzeContentExpression(content, Type.ELEMENT, env); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1515" : "XQDY0027"); ); try { schemaType.analyzeContentExpression(content, Type.ELEMENT, env); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1540" : "XQDY0027");
new ContentTypeTest(Type.ELEMENT, schemaType, config)); try { schemaType.analyzeContentExpression(content, Type.ELEMENT, env); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1510" : "XQDY0027"); xsiType.analyzeContentExpression(content, Type.ELEMENT, env); try { config.checkTypeDerivationIsOK(xsiType, schemaType, 0); new ContentTypeTest(Type.ELEMENT, instr.getSchemaType(), config)); try { schemaType.analyzeContentExpression(content, Type.ELEMENT, env); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1515" : "XQDY0027"); ); try { schemaType.analyzeContentExpression(content, Type.ELEMENT, env); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1540" : "XQDY0027");
Expression parent = getParentExpression(); Block block = new Block(new Expression[]{this}); parentType.analyzeContentExpression(block, Type.ELEMENT); setParentExpression(parent);
Expression parent = getParentExpression(); Block block = new Block(new Expression[]{this}); parentType.analyzeContentExpression(block, Type.ELEMENT); setParentExpression(parent);
instr.getValidationOptions().setTopLevelType(schemaType); try { schemaType.analyzeContentExpression(content, Type.ELEMENT); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1510" : "XQDY0027"); new ContentTypeTest(Type.ELEMENT, instr.getSchemaType(), config, false)); try { schemaType.analyzeContentExpression(content, Type.ELEMENT); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1515" : "XQDY0027"); ); try { schemaType.analyzeContentExpression(content, Type.ELEMENT); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1540" : "XQDY0027");
instr.getValidationOptions().setTopLevelType(schemaType); try { schemaType.analyzeContentExpression(content, Type.ELEMENT); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1510" : "XQDY0027"); new ContentTypeTest(Type.ELEMENT, instr.getSchemaType(), config, false)); try { schemaType.analyzeContentExpression(content, Type.ELEMENT); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1515" : "XQDY0027"); ); try { schemaType.analyzeContentExpression(content, Type.ELEMENT); } catch (XPathException e) { e.setErrorCode(instr.isXSLT() ? "XTTE1540" : "XQDY0027");