Project

Profile

Help

Revision dbea1dea

Added by Michael Kay almost 13 years ago

Fix bug 2412010: -expand:off on .NET

View differences:

latest9.1/bj/net/sf/saxon/dotnet/DotNetPullProvider.java
27 27
    private NamePool pool;
28 28
    private String baseURI;
29 29
    private boolean isEmptyElement = false;
30
    private boolean expandDefaults = true;
30 31
    private int current = START_OF_INPUT;
31 32

  
32 33
    /**
......
107 108
                final String localName = parser.get_LocalName();
108 109
                if ("xmlns".equals(prefix) || ("".equals(prefix) && "xmlns".equals(localName))) {
109 110
                    // skip the namespace declaration
110
                } else {
111
                } else if (expandDefaults || !parser.get_IsDefault()) {
111 112
                    int nc = pool.allocate(prefix, namespaceURI, localName);
112 113
                    // .NET does not report the attribute type (even if it's an ID...)
113 114
                    atts.addAttribute(nc, StandardNames.XS_UNTYPED_ATOMIC, parser.get_Value(), 0, 0);
......
391 392
    public void setPipelineConfiguration(PipelineConfiguration pipe) {
392 393
        this.pipe = pipe;
393 394
        pool = pipe.getConfiguration().getNamePool();
395
        expandDefaults = pipe.getConfiguration().isExpandAttributeDefaults();
394 396
    }
395 397

  
396 398
    /**

Also available in: Unified diff