Project

Profile

Help

Revision a51c804b

Added by Michael Kay about 12 years ago

2885500 Chronic performance during query/stylesheet type checking Note: also requires corresponding change to UserComplexType in Saxonica proprietary code

View differences:

latest9.1/bj/net/sf/saxon/expr/AxisExpression.java
284 284
                                    test,
285 285
                                    Token.INTERSECT,
286 286
                                    new ContentTypeTest(Type.ELEMENT, schemaType, env.getConfiguration()));
287
                            computedCardinality = ((ComplexType)contentType).getElementParticleCardinality(childElement);
287
                            computedCardinality = ((ComplexType)contentType).getElementParticleCardinality(childElement, true);
288 288
                            visitor.resetStaticProperties();
289 289
                            if (computedCardinality == StaticProperty.ALLOWS_ZERO) {
290 290
                                // this shouldn't happen, because we've already checked for this a different way.
latest9.1/bj/net/sf/saxon/style/StyleElement.java
39 39
 * an XSL error is found.
40 40
 */
41 41

  
42
public abstract class gStyleElement extends ElementImpl
42
public abstract class StyleElement extends ElementImpl
43 43
        implements Locator, Container, InstructionInfo {
44 44

  
45 45
    protected short[] extensionNamespaces = null;		// a list of URI codes
latest9.1/bj/net/sf/saxon/type/AnyType.java
389 389
     * If there is no such particle, return zero.
390 390
     *
391 391
     * @param fingerprint Identifies the name of the child element within this content model
392
     * @param searchExtensionTypes
392 393
     */
393 394

  
394
    public int getElementParticleCardinality(int fingerprint) {
395
    public int getElementParticleCardinality(int fingerprint, boolean searchExtensionTypes) {
395 396
        return StaticProperty.ALLOWS_ZERO_OR_MORE;
396 397
    }
397 398

  
latest9.1/bj/net/sf/saxon/type/ComplexType.java
125 125
     * {@link net.sf.saxon.expr.StaticProperty#ALLOWS_ZERO_OR_MORE}, {@link net.sf.saxon.expr.StaticProperty#ALLOWS_ONE_OR_MORE},
126 126
     * If there is no such particle, return {@link net.sf.saxon.expr.StaticProperty#EMPTY}.
127 127
     * @param fingerprint Identifies the name of the child element within this content model
128
     * @param searchExtensionTypes
128 129
     * @return the cardinality associated with the child element particle with the given name.
129 130
     * If there is no such particle, return {@link net.sf.saxon.expr.StaticProperty#EMPTY}.
130 131
     */
131 132

  
132
    public int getElementParticleCardinality(int fingerprint) throws SchemaException, ValidationException;
133
    public int getElementParticleCardinality(int fingerprint, boolean searchExtensionTypes) throws SchemaException, ValidationException;
133 134

  
134 135
    /**
135 136
     * Find an attribute use within this complex type definition having a given attribute name
latest9.1/bj/net/sf/saxon/type/Untyped.java
401 401
     * If there is no such particle, return zero.
402 402
     *
403 403
     * @param fingerprint Identifies the name of the child element within this content model
404
     * @param searchExtensionTypes
404 405
     */
405 406

  
406
    public int getElementParticleCardinality(int fingerprint) {
407
    public int getElementParticleCardinality(int fingerprint, boolean searchExtensionTypes) {
407 408
        return StaticProperty.ALLOWS_ZERO_OR_MORE;
408 409
    }
409 410

  
latest9.2/hej/net/sf/saxon/expr/AxisExpression.java
287 287
                                    test,
288 288
                                    Token.INTERSECT,
289 289
                                    new ContentTypeTest(Type.ELEMENT, schemaType, env.getConfiguration()));
290
                            computedCardinality = ((ComplexType)contentType).getElementParticleCardinality(childElement);
290
                            computedCardinality = ((ComplexType)contentType).getElementParticleCardinality(childElement, true);
291 291
                            visitor.resetStaticProperties();
292 292
                            if (computedCardinality == StaticProperty.ALLOWS_ZERO) {
293 293
                                // this shouldn't happen, because we've already checked for this a different way.
latest9.2/hej/net/sf/saxon/type/AnyType.java
436 436
     * If there is no such particle, return zero.
437 437
     *
438 438
     * @param fingerprint Identifies the name of the child element within this content model
439
     * @param searchExtendedTypes
439 440
     */
440 441

  
441
    public int getElementParticleCardinality(int fingerprint) {
442
    public int getElementParticleCardinality(int fingerprint, boolean searchExtendedTypes) {
442 443
        return StaticProperty.ALLOWS_ZERO_OR_MORE;
443 444
    }
444 445

  
latest9.2/hej/net/sf/saxon/type/ComplexType.java
144 144
     * {@link net.sf.saxon.expr.StaticProperty#ALLOWS_ZERO_OR_MORE}, {@link net.sf.saxon.expr.StaticProperty#ALLOWS_ONE_OR_MORE},
145 145
     * If there is no such particle, return {@link net.sf.saxon.expr.StaticProperty#EMPTY}.
146 146
     * @param fingerprint Identifies the name of the child element within this content model
147
     * @param searchExtendedTypes true if types derived by extension from this type are to be considered
147 148
     * @return the cardinality associated with the child element particle with the given name.
148 149
     * If there is no such particle, return {@link net.sf.saxon.expr.StaticProperty#EMPTY}.
149 150
     */
150 151

  
151
    public int getElementParticleCardinality(int fingerprint) throws SchemaException, ValidationException;
152
    public int getElementParticleCardinality(int fingerprint, boolean searchExtendedTypes) throws SchemaException, ValidationException;
152 153

  
153 154
    /**
154 155
     * Find an attribute use within this complex type definition having a given attribute name
latest9.2/hej/net/sf/saxon/type/Untyped.java
446 446
     * If there is no such particle, return zero.
447 447
     *
448 448
     * @param fingerprint Identifies the name of the child element within this content model
449
     * @param searchExtendedTypes
449 450
     */
450 451

  
451
    public int getElementParticleCardinality(int fingerprint) {
452
    public int getElementParticleCardinality(int fingerprint, boolean searchExtendedTypes) {
452 453
        return StaticProperty.ALLOWS_ZERO_OR_MORE;
453 454
    }
454 455

  

Also available in: Unified diff