bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
boolean matches(QName mode, Node node) { if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) { return false; } if (match == null) { return false; } return match.matches(node); }
boolean matches(QName mode, Node node) if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) return false; } if (match == null) return false; } return match.matches(node); }
15,726
boolean matches(QName mode, Node node) { if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) { return false; } if (match == null) { return false; } return match.matches(node); }
boolean matches(QName mode, Node node) { if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) { return false; if (match == null) { return false; return match.matches(node); }
15,727
boolean matches(QName mode, Node node) { if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) { return false; } if (match == null) { return false; } return match.matches(node); }
boolean matches(QName mode, Node node) if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) return false; } if (match == null) return false; } return match.matches(node); }
15,728
boolean matches(QName mode, Node node) { if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) { return false; } if (match == null) { return false; } return match.matches(node); }
boolean matches(QName mode, Node node) { if ((mode == null && this.mode != null) || (mode != null && !mode.equals(this.mode))) { return false; if (isAnyNode && node.getNodeType() == Node.DOCUMENT_NODE) return false; if (match == null) { return false; if (isAnyNode && node.getNodeType() == Node.DOCUMENT_NODE) return false; return match.matches(node); }
15,729
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); } out.println(toString()); if (children != null) { children.list(depth + 1, out, true); } if (listNext && next != null) { next.list(depth, out, listNext); } }
void list(int depth, PrintStream out, boolean listNext) for (int i = 0; i < depth; i++) out.print(" "); } out.println(toString()); if (children != null) children.list(depth + 1, out, true); } if (listNext && next != null) next.list(depth, out, listNext); } }
15,730
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); } out.println(toString()); if (children != null) { children.list(depth + 1, out, true); } if (listNext && next != null) { next.list(depth, out, listNext); } }
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); out.println(toString()); if (children != null) { children.list(depth + 1, out, true); if (listNext && next != null) { next.list(depth, out, listNext); }
15,731
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); } out.println(toString()); if (children != null) { children.list(depth + 1, out, true); } if (listNext && next != null) { next.list(depth, out, listNext); } }
void list(int depth, PrintStream out, boolean listNext) for (int i = 0; i < depth; i++) out.print(" "); } out.println(toString()); if (children != null) children.list(depth + 1, out, true); } if (listNext && next != null) next.list(depth, out, listNext); } }
15,732
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); } out.println(toString()); if (children != null) { children.list(depth + 1, out, true); } if (listNext && next != null) { next.list(depth, out, listNext); } }
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); out.println(toString()); if (children != null) { children.list(depth + 1, out, true); if (listNext && next != null) { next.list(depth, out, listNext); }
15,733
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); } out.println(toString()); if (children != null) { children.list(depth + 1, out, true); } if (listNext && next != null) { next.list(depth, out, listNext); } }
void list(int depth, PrintStream out, boolean listNext) for (int i = 0; i < depth; i++) out.print(" "); } out.println(toString()); if (children != null) children.list(depth + 1, out, true); } if (listNext && next != null) next.list(depth, out, listNext); } }
15,734
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); } out.println(toString()); if (children != null) { children.list(depth + 1, out, true); } if (listNext && next != null) { next.list(depth, out, listNext); } }
void list(int depth, PrintStream out, boolean listNext) { for (int i = 0; i < depth; i++) { out.print(" "); out.println(toString()); if (children != null) { children.list(depth + 1, out, true); if (listNext && next != null) { next.list(depth, out, listNext); }
15,735
Object getNegotiatedProperty(String propName) throws SaslException;
Object getNegotiatedProperty(String propName) throws SaslException;
15,736
public DecimalFormat (String pattern, DecimalFormatSymbols symbols) { if (symbols == null) { throw new NullPointerException("Supplied set of symbols is null."); } this.symbols = symbols; applyPattern(pattern); }
public DecimalFormat () { if (symbols == null) { throw new NullPointerException("Supplied set of symbols is null."); } this.symbols = symbols; applyPattern(pattern); }
15,737
public DecimalFormat (String pattern, DecimalFormatSymbols symbols) { if (symbols == null) { throw new NullPointerException("Supplied set of symbols is null."); } this.symbols = symbols; applyPattern(pattern); }
public DecimalFormat (String pattern, DecimalFormatSymbols symbols) { if (symbols == null) { throw new NullPointerException("Supplied set of symbols is null."); } this.symbols = symbols; applyPattern(pattern); }
15,738
public NO_IMPLEMENT() { super("", 0, CompletionStatus.COMPLETED_NO); }
public NO_IMPLEMENT(String message) { super("", 0, CompletionStatus.COMPLETED_NO); }
15,739
public NO_IMPLEMENT() { super("", 0, CompletionStatus.COMPLETED_NO); }
public NO_IMPLEMENT() { super(message, 0, CompletionStatus.COMPLETED_NO); }
15,740
public PendingBuffer(int bufsize) { buf = new byte[bufsize]; }
public PendingBuffer() { buf = new byte[bufsize]; }
15,741
public PendingBuffer(int bufsize) { buf = new byte[bufsize]; }
public PendingBuffer(int bufsize) { this( 4096 ); }
15,742
public Object clone() { try { // The JCL says that the `extra' field is also copied. ZipEntry clone = (ZipEntry) super.clone(); if (extra != null) clone.extra = (byte[]) extra.clone(); return clone; } catch (CloneNotSupportedException ex) { throw new InternalError(); } }
public Object clone() { try { // The JCL says that the `extra' field is also copied. ZipEntry clone = (ZipEntry) super.clone(); if (extra != null) clone.extra = (byte[]) extra.clone(); return clone; } catch (CloneNotSupportedException ex) { throw new InternalError(); } }
15,743
public Object clone() { try { // The JCL says that the `extra' field is also copied. ZipEntry clone = (ZipEntry) super.clone(); if (extra != null) clone.extra = (byte[]) extra.clone(); return clone; } catch (CloneNotSupportedException ex) { throw new InternalError(); } }
public Object clone() { try { // The JCL says that the `extra' field is also copied. ZipEntry clone = (ZipEntry) super.clone(); if (extra != null) clone.extra = (byte[]) extra.clone(); return clone; } catch (CloneNotSupportedException ex) { throw new InternalError(); } }
15,744
public RandomAccessFile (String fileName, String mode) throws FileNotFoundException { this (new File(fileName), mode); }
public RandomAccessFile (File file, String mode) throws FileNotFoundException { this (new File(fileName), mode); }
15,745
public RandomAccessFile (String fileName, String mode) throws FileNotFoundException { this (new File(fileName), mode); }
public RandomAccessFile (String fileName, String mode) throws FileNotFoundException { int fdmode; if (mode.equals("r")) fdmode = FileChannelImpl.READ; else if (mode.equals("rw")) fdmode = FileChannelImpl.READ | FileChannelImpl.WRITE; else if (mode.equals("rws")) { fdmode = (FileChannelImpl.READ | FileChannelImpl.WRITE | FileChannelImpl.SYNC); } else if (mode.equals("rwd")) { fdmode = (FileChannelImpl.READ | FileChannelImpl.WRITE | FileChannelImpl.DSYNC); } else throw new IllegalArgumentException ("invalid mode: " + mode); final String fileName = file.getPath(); SecurityManager s = System.getSecurityManager(); if (s != null) { s.checkRead(fileName); if ((fdmode & FileChannelImpl.WRITE) != 0) s.checkWrite(fileName); } ch = FileChannelImpl.create(file, fdmode); fd = new FileDescriptor(ch); if ((fdmode & FileChannelImpl.WRITE) != 0) out = new DataOutputStream (new FileOutputStream (fd)); else out = null; in = new DataInputStream (new FileInputStream (fd)); }
15,746
public int getMethod() { return method; }
public int getMethod() { return method; }
15,747
public long getCompressedSize() { return (known & KNOWN_CSIZE) != 0 ? compressedSize & 0xffffffffL : -1L; }
public long getCompressedSize() { return (known & KNOWN_CSIZE) != 0 ? compressedSize & 0xffffffffL : -1L; }
15,748
public void setMethod(int method) { if (method != ZipOutputStream.STORED && method != ZipOutputStream.DEFLATED) throw new IllegalArgumentException(); this.method = (short) method; }
public void setMethod(int method) { if (method != ZipOutputStream.STORED && method != ZipOutputStream.DEFLATED) throw new IllegalArgumentException(); this.method = (short) method; }
15,749
public void setCrc(long crc) { if ((crc & 0xffffffff00000000L) != 0) { throw new IllegalArgumentException("invalid crc"); } this.crc = (int) crc; this.known |= KNOWN_CRC; }
public void setCrc(long crc) { if ((crc & 0xffffffff00000000L) != 0) { throw new IllegalArgumentException("invalid crc"); } this.crc = (int) crc; this.known |= KNOWN_CRC; }
15,750
public void setSize(long size) { if ((size & 0xffffffff00000000L) != 0) throw new IllegalArgumentException(); this.size = (int) size; this.known |= KNOWN_SIZE; }
public void setSize(long size) { if ((size & 0xffffffff00000000L) != 0) throw new IllegalArgumentException(); this.size = (int) size; this.known |= KNOWN_SIZE; }
15,751
public void setCompressedSize(long csize) { if ((csize & 0xffffffff00000000L) != 0) throw new IllegalArgumentException(); this.compressedSize = (int) csize; this.known |= KNOWN_CSIZE; }
public void setCompressedSize(long csize) { if ((csize & 0xffffffff00000000L) != 0) throw new IllegalArgumentException(); this.compressedSize = (int) csize; this.known |= KNOWN_CSIZE; }
15,752
final void setDOSTime(int dostime) { this.dostime = dostime; known |= KNOWN_TIME; }
final void setDOSTime(int dostime) { this.dostime = dostime; known |= KNOWN_TIME; }
15,753
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
15,754
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
15,755
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
15,756
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
15,757
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
public void setExtra(byte[] extra) { if (extra == null) { this.extra = null; return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); this.extra = extra; try { int pos = 0; while (pos < extra.length) { int sig = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; int len = (extra[pos++] & 0xff) | (extra[pos++] & 0xff) << 8; if (sig == 0x5455) { /* extended time stamp */ int flags = extra[pos]; if ((flags & 1) != 0) { long time = ((extra[pos + 1] & 0xff) | (extra[pos + 2] & 0xff) << 8 | (extra[pos + 3] & 0xff) << 16 | (extra[pos + 4] & 0xff) << 24); setTime(time); } } pos += len; } } catch (ArrayIndexOutOfBoundsException ex) { /* be lenient */ return; } }
15,758
public void setComment(String comment) { if (comment.length() > 0xffff) throw new IllegalArgumentException(); this.comment = comment; }
public void setComment(String comment) { if (comment.length() > 0xffff) throw new IllegalArgumentException(); this.comment = comment; }
15,759
public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) { this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); }
public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button) { this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); }
15,760
public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) { this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); }
public MouseEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger) { this(source, id, when, modifiers, x, y, clickCount, popupTrigger, NOBUTTON); }
15,761
public void performTwoPasses(Reader reader, OutputStream out) throws Exception{ StringWriter sw = new StringWriter(); char[] buf = new char[1024]; for(int count; (count = reader.read(buf)) > -1; sw.write(buf, 0, count)); sw.flush(); sw.close(); String data = sw.toString(); //1st pass ReInit(new StringReader(data)); setPass(1); jnasmInput(); assemble(0); //2nd pass setPass(2); instructions.clear(); ReInit(new StringReader(data)); jnasmInput(); emmit(out); }
public void performTwoPasses(Reader reader, OutputStream out) throws Exception{ StringWriter sw = new StringWriter(); char[] buf = new char[1024]; for(int count; (count = reader.read(buf)) > -1; sw.write(buf, 0, count)); sw.flush(); sw.close(); String data = sw.toString(); //1st pass ReInit(new StringReader(data)); setPass(1); jnasmInput(); assemble(0); //2nd pass setPass(2); instructions.clear(); ReInit(new StringReader(data)); jnasmInput(); emit(out); }
15,762
public String getUIClassID() { return "JEditorPane"; }
public String getUIClassID() { return "JEditorPane"; }
15,764
public String toExternalForm() { // Identical to toString(). return handler.toExternalForm(this); }
public String toExternalForm() { // Identical to toString(). return handler.toExternalForm(this); }
15,765
public String toExternalForm() { // Identical to toString(). return handler.toExternalForm(this); }
public String toExternalForm() { // Identical to toString(). return ph.toExternalForm(this); }
15,766
public String getValue(Name name) { return (String) get(name); }
public String getValue(String name) { return (String) get(name); }
15,767
public String getValue(Name name) { return (String) get(name); }
public String getValue(Name name) { return (String) get(new Name(name)); }
15,768
public abstract EntityReference createEntityReference(String name, String replacementText);
public abstract EntityReference createEntityReference(String name, String replacementText);
15,769
Attribute(String name, String value) { this.name = name; this.value = value; this.nameSpace = ""; }
Attribute(String name, String value, boolean specified) { this.name = name; this.value = value; this.nameSpace = ""; }
15,770
void attribute (String qname, String value, boolean isSpecified) throws SAXException { if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (prefix.equals("")) fatal ("missing prefix in namespace declaration attribute"); if (value.length () == 0) { verror ("missing URI in namespace declaration attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } else { if ("xmlns".equals(qname)) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (value.length () == 0) { verror ("missing URI in namespace decl attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } } // remember this attribute ... if (attributeCount == attributeSpecified.length) { // grow array? boolean temp [] = new boolean [attributeSpecified.length + 5]; System.arraycopy (attributeSpecified, 0, temp, 0, attributeCount); attributeSpecified = temp; } attributeSpecified [attributeCount] = isSpecified; attributeCount++; // attribute type comes from querying parser's DTD records attributesList.add(new Attribute(qname, value)); }
void attribute (String qname, String value, boolean isSpecified) throws SAXException { if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (prefix.equals("")) fatal ("missing prefix in namespace declaration attribute"); if (value.length () == 0) { verror ("missing URI in namespace declaration attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } else { if ("xmlns".equals(qname)) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (value.length () == 0) { verror ("missing URI in namespace decl attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } } // remember this attribute ... if (attributeCount == attributeSpecified.length) { // grow array? boolean temp [] = new boolean [attributeSpecified.length + 5]; System.arraycopy (attributeSpecified, 0, temp, 0, attributeCount); attributeSpecified = temp; } attributeSpecified [attributeCount] = isSpecified; attributeCount++; // attribute type comes from querying parser's DTD records attributesList.add(new Attribute(qname, value)); }
15,772
void attribute (String qname, String value, boolean isSpecified) throws SAXException { if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (prefix.equals("")) fatal ("missing prefix in namespace declaration attribute"); if (value.length () == 0) { verror ("missing URI in namespace declaration attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } else { if ("xmlns".equals(qname)) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (value.length () == 0) { verror ("missing URI in namespace decl attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } } // remember this attribute ... if (attributeCount == attributeSpecified.length) { // grow array? boolean temp [] = new boolean [attributeSpecified.length + 5]; System.arraycopy (attributeSpecified, 0, temp, 0, attributeCount); attributeSpecified = temp; } attributeSpecified [attributeCount] = isSpecified; attributeCount++; // attribute type comes from querying parser's DTD records attributesList.add(new Attribute(qname, value)); }
void attribute (String qname, String value, boolean isSpecified) throws SAXException { if (!attributes) { attributes = true; if (namespaces) prefixStack.pushContext (); } // process namespace decls immediately; // then maybe forget this as an attribute if (namespaces) { int index; // default NS declaration? if (getFeature (FEATURE + "string-interning")) { if ("xmlns" == qname) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (prefix.equals("")) fatal ("missing prefix in namespace declaration attribute"); if (value.length () == 0) { verror ("missing URI in namespace declaration attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } else { if ("xmlns".equals(qname)) { declarePrefix ("", value); if (!xmlNames) return; } // NS prefix declaration? else if ((index = qname.indexOf (':')) == 5 && qname.startsWith ("xmlns")) { String prefix = qname.substring (6); if (value.length () == 0) { verror ("missing URI in namespace decl attribute: " + qname); } else declarePrefix (prefix, value); if (!xmlNames) return; } } } // remember this attribute ... if (attributeCount == attributeSpecified.length) { // grow array? boolean temp [] = new boolean [attributeSpecified.length + 5]; System.arraycopy (attributeSpecified, 0, temp, 0, attributeCount); attributeSpecified = temp; } attributeSpecified [attributeCount] = isSpecified; attributeCount++; // attribute type comes from querying parser's DTD records attributesList.add(new Attribute(qname, value, isSpecified)); }
15,773
public boolean isDeclared (int index) { if (index < 0 || index >= attributeCount) throw new ArrayIndexOutOfBoundsException (); return attributeDeclared [index]; }
public boolean isDeclared (int index) { if (index < 0 || index >= attributeCount) throw new ArrayIndexOutOfBoundsException (); String type = parser.getAttributeType(elementName, getQName(index)); return (type != null); }
15,774
public boolean isSpecified (int index) { if (index < 0 || index >= attributeCount) throw new ArrayIndexOutOfBoundsException (); return attributeSpecified [index]; }
public boolean isSpecified (int index) { if (index < 0 || index >= attributeCount) throw new ArrayIndexOutOfBoundsException (); return attributeSpecified [index]; }
15,775
private void reset () { elementName = null; entityStack = new Stack (); attributesList = Collections.synchronizedList(new ArrayList()); attributeSpecified = new boolean[10]; attributeDeclared = new boolean[10]; attributeCount = 0; attributes = false; nsTemp = new String[3]; prefixStack = null; }
private void reset () { elementName = null; entityStack = new Stack (); attributesList = Collections.synchronizedList(new ArrayList()); attributeSpecified = new boolean[10]; attributeDeclared = new boolean[10]; attributeCount = 0; attributes = false; nsTemp = new String[3]; prefixStack = null; }
15,776
public int getColumnNumber () { return column; }
public int getColumnNumber() { return column; }
15,777
boolean isStandalone () { return docIsStandalone; }
boolean isStandalone () { return docIsStandalone; }
15,778
public int getLineNumber () { return line; }
public int getLineNumber() { return line; }
15,779
public String getAttributeType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [0]; } }
public String getAttributeType(String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [0]; } }
15,780
public String getAttributeType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [0]; } }
public String getAttributeType (String name, String aname) { Object attribute[] = getAttribute (name, aname); if (attribute == null) { return null; } else { return (String) attribute [0]; } }
15,781
XmlParser () { }
XmlParser () { }
15,782
void setHandler (SAXDriver handler) { this.handler = handler; }
void setHandler (SAXDriver handler) { this.handler = handler; }
15,783
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
15,784
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
15,785
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
15,786
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
void doParse ( String systemId, String publicId, Reader reader, InputStream stream, String encoding ) throws Exception { if (handler == null) throw new IllegalStateException ("no callback handler"); initializeVariables (); // predeclare the built-in entities here (replacement texts) // we don't need to intern(), since we're guaranteed literals // are always (globally) interned. setInternalEntity ("amp", "&#38;"); setInternalEntity ("lt", "&#60;"); setInternalEntity ("gt", "&#62;"); setInternalEntity ("apos", "&#39;"); setInternalEntity ("quot", "&#34;"); try { // pushURL first to ensure locator is correct in startDocument // ... it might report an IO or encoding exception. handler.startDocument (); pushURL (false, "[document]", // default baseURI: null new String [] { publicId, systemId, null}, reader, stream, encoding, false); parseDocument (); } catch (EOFException e){ //empty input error("empty document, with no root element."); }finally { if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } if (stream != null) try { stream.close (); } catch (IOException e) { /* ignore */ } if (is != null) try { is.close (); } catch (IOException e) { /* ignore */ } if (reader != null) try { reader.close (); } catch (IOException e) { /* ignore */ } scratch = null; } }
15,787
public Throwable getException() { return containedException; }
public Throwable getException() { return containedException; }
15,788
public String getLocationAsString() { if (locator == null) return null; StringBuffer retval = new StringBuffer (); if (locator.getPublicId () != null) { retval.append ("public='"); retval.append (locator.getPublicId ()); retval.append ("' "); } if (locator.getSystemId () != null) { retval.append ("uri='"); retval.append (locator.getSystemId ()); retval.append ("' "); } if (locator.getLineNumber () != -1) { retval.append ("line="); retval.append (locator.getLineNumber ()); retval.append (" "); } if (locator.getColumnNumber () != -1) { retval.append ("column="); retval.append (locator.getColumnNumber ()); //retval.append (" "); } return retval.toString (); }
public String getLocationAsString() { if (locator == null) return null; StringBuffer retval = new StringBuffer (); if (locator.getPublicId () != null) { retval.append ("public='"); retval.append (locator.getPublicId ()); retval.append ("' "); } if (locator.getSystemId () != null) { retval.append ("uri='"); retval.append (locator.getSystemId ()); retval.append ("' "); } if (locator.getLineNumber () != -1) { retval.append ("line="); retval.append (locator.getLineNumber ()); retval.append (" "); } if (locator.getColumnNumber () != -1) { retval.append ("column="); retval.append (locator.getColumnNumber ()); //retval.append (" "); } return retval.toString (); }
15,789
public SourceLocator getLocator() { return locator; }
public SourceLocator getLocator() { return locator; }
15,791
public String getMessageAndLocation() { if (locator == null) return getMessage (); return getMessage () + ": " + getLocationAsString (); }
public String getMessageAndLocation() { if (locator == null) return getMessage (); return getMessage () + ": " + getLocationAsString (); }
15,792
public synchronized Throwable initCause(Throwable cause) { if (cause == this) throw new IllegalArgumentException (); if (containedException != null) throw new IllegalStateException (); containedException = cause; causeKnown = true;// FIXME: spec implies "this" may be the right value; another bug? return cause; }
public synchronized Throwable initCause(Throwable cause) { if (cause == this) throw new IllegalArgumentException (); if (containedException != null) throw new IllegalStateException (); containedException = cause; causeKnown = true;// FIXME: spec implies "this" may be the right value; another bug? return cause; }
15,793
public void printStackTrace() { printStackTrace(System.out);// shouldn't it be System.err? }
public void printStackTrace() { printStackTrace(System.out);// shouldn't it be System.err? }
15,795
public void setLocator (SourceLocator location) { locator = location; }
public void setLocator (SourceLocator location) { locator = location; }
15,796
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else { elementExcludeResultPrefixes = null; } }
LiteralNode(Node source) this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) elementExcludeResultPrefixes.add(st.nextToken()); } } else elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else elementExcludeResultPrefixes = null; } }
15,797
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else { elementExcludeResultPrefixes = null; } }
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); else { elementExcludeResultPrefixes = Collections.EMPTY_SET; else { elementExcludeResultPrefixes = null; }
15,798
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else { elementExcludeResultPrefixes = null; } }
LiteralNode(Node source) this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) elementExcludeResultPrefixes.add(st.nextToken()); } } else elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else elementExcludeResultPrefixes = null; } }
15,799
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else { elementExcludeResultPrefixes = null; } }
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); else { elementExcludeResultPrefixes = Collections.EMPTY_SET; else { elementExcludeResultPrefixes = null; }
15,800
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else { elementExcludeResultPrefixes = null; } }
LiteralNode(Node source) this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) elementExcludeResultPrefixes.add(st.nextToken()); } } else elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else elementExcludeResultPrefixes = null; } }
15,801
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); } } else { elementExcludeResultPrefixes = Collections.EMPTY_SET; } } else { elementExcludeResultPrefixes = null; } }
LiteralNode(Node source) { this.source = source; if (source.getNodeType() == Node.ELEMENT_NODE) { NamedNodeMap attrs = source.getAttributes(); Node attr = attrs.getNamedItemNS(Stylesheet.XSL_NS, "exclude-result-prefixes"); if (attr != null) { elementExcludeResultPrefixes = new HashSet(); StringTokenizer st = new StringTokenizer(attr.getNodeValue()); while (st.hasMoreTokens()) { elementExcludeResultPrefixes.add(st.nextToken()); else { elementExcludeResultPrefixes = Collections.EMPTY_SET; else { elementExcludeResultPrefixes = null; }
15,802
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new LiteralNode(source); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
TemplateNode clone(Stylesheet stylesheet) TemplateNode ret = new LiteralNode(source); if (children != null) ret.children = children.clone(stylesheet); } if (next != null) ret.next = next.clone(stylesheet); } return ret; }
15,803
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new LiteralNode(source); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new LiteralNode(source); if (children != null) { ret.children = children.clone(stylesheet); if (next != null) { ret.next = next.clone(stylesheet); return ret; }
15,804
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new LiteralNode(source); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
TemplateNode clone(Stylesheet stylesheet) TemplateNode ret = new LiteralNode(source); if (children != null) ret.children = children.clone(stylesheet); } if (next != null) ret.next = next.clone(stylesheet); } return ret; }
15,805
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new LiteralNode(source); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; }
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new LiteralNode(source); if (children != null) { ret.children = children.clone(stylesheet); if (next != null) { ret.next = next.clone(stylesheet); return ret; }
15,806
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) // Ignore attributes added after child elements } else // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) String prefix = source.getPrefix(); if (prefix == null) prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) if ("#default".equals(resultPrefix)) resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) int l = attrs.getLength(); for (int i = 0; i < l; i++) Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) parent.insertBefore(result, nextSibling); } else parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
15,807
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); result = result2; if (nextSibling != null) { parent.insertBefore(result, nextSibling); else { parent.appendChild(result); if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); }
15,808
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) // Ignore attributes added after child elements } else // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) String prefix = source.getPrefix(); if (prefix == null) prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) if ("#default".equals(resultPrefix)) resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) int l = attrs.getLength(); for (int i = 0; i < l; i++) Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) parent.insertBefore(result, nextSibling); } else parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
15,809
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); result = result2; if (nextSibling != null) { parent.insertBefore(result, nextSibling); else { parent.appendChild(result); if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); }
15,810
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) // Ignore attributes added after child elements } else // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) String prefix = source.getPrefix(); if (prefix == null) prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) if ("#default".equals(resultPrefix)) resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) int l = attrs.getLength(); for (int i = 0; i < l; i++) Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) parent.insertBefore(result, nextSibling); } else parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
15,811
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); result = result2; if (nextSibling != null) { parent.insertBefore(result, nextSibling); else { parent.appendChild(result); if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); }
15,812
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) // Ignore attributes added after child elements } else // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) String prefix = source.getPrefix(); if (prefix == null) prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) if ("#default".equals(resultPrefix)) resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) int l = attrs.getLength(); for (int i = 0; i < l; i++) Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) parent.insertBefore(result, nextSibling); } else parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
15,813
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); result = result2; if (nextSibling != null) { parent.insertBefore(result, nextSibling); else { parent.appendChild(result); if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); }
15,814
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) // Ignore attributes added after child elements } else // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) String prefix = source.getPrefix(); if (prefix == null) prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) if ("#default".equals(resultPrefix)) resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) int l = attrs.getLength(); for (int i = 0; i < l; i++) Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) parent.insertBefore(result, nextSibling); } else parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
15,815
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); result = result2; if (nextSibling != null) { parent.insertBefore(result, nextSibling); else { parent.appendChild(result); if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); }
15,816
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) // Ignore attributes added after child elements } else // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) String prefix = source.getPrefix(); if (prefix == null) prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) if ("#default".equals(resultPrefix)) resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) int l = attrs.getLength(); for (int i = 0; i < l; i++) Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) parent.insertBefore(result, nextSibling); } else parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
15,817
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); result = result2; if (nextSibling != null) { parent.insertBefore(result, nextSibling); else { parent.appendChild(result); if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); }
15,818
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) // Ignore attributes added after child elements } else // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) String prefix = source.getPrefix(); if (prefix == null) prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) if ("#default".equals(resultPrefix)) resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) int l = attrs.getLength(); for (int i = 0; i < l; i++) Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) parent.insertBefore(result, nextSibling); } else parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
15,819
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements } else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; } String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; } String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); } } } } if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; } } } Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); } result = result2; } if (nextSibling != null) { parent.insertBefore(result, nextSibling); } else { parent.appendChild(result); } if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); } // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); } } // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); } }
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { Node result = null; Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); short nodeType = source.getNodeType(); if (nodeType == Node.ATTRIBUTE_NODE && parent.getFirstChild() != null) { // Ignore attributes added after child elements else { // Namespace aliasing if (nodeType == Node.ELEMENT_NODE) { String prefix = source.getPrefix(); if (prefix == null) { prefix = "#default"; String resultPrefix = (String) stylesheet.namespaceAliases.get(prefix); if (resultPrefix != null) { if ("#default".equals(resultPrefix)) { resultPrefix = null; String uri = source.lookupNamespaceURI(resultPrefix); String name = source.getNodeName(); // Create a new element node in the result document result = doc.createElementNS(uri, name); // copy attributes NamedNodeMap srcAttrs = source.getAttributes(); NamedNodeMap dstAttrs = result.getAttributes(); int l = srcAttrs.getLength(); for (int i = 0; i < l; i++) { Node attr = srcAttrs.item(i); if (!Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attr = attr.cloneNode(true); attr = doc.adoptNode(attr); dstAttrs.setNamedItemNS(attr); if (result == null) { // Create result node result = source.cloneNode(false); // Remove any XSL attributes NamedNodeMap attrs = result.getAttributes(); if (attrs != null) { int l = attrs.getLength(); for (int i = 0; i < l; i++) { Node attr = attrs.item(i); if (Stylesheet.XSL_NS.equals(attr.getNamespaceURI())) { attrs.removeNamedItem(attr.getNodeName()); i--; l--; Node result2 = doc.adoptNode(result); if (result2 == null) { String msg = "Error adopting node to result tree: " + result + " (" + result.getClass().getName() + ")"; DOMSourceLocator l = new DOMSourceLocator(context); throw new TransformerException(msg, l); result = result2; if (nextSibling != null) { parent.insertBefore(result, nextSibling); else { parent.appendChild(result); if (nodeType == Node.ELEMENT_NODE) { stylesheet.addNamespaceNodes(source, result, doc, elementExcludeResultPrefixes); // children if (children != null) { children.apply(stylesheet, mode, context, pos, len, result, null); // next sibling if (next != null) { next.apply(stylesheet, mode, context, pos, len, parent, nextSibling); }
15,820
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("source="); buf.append(source); buf.append(']'); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer(getClass().getName()); buf.append('['); buf.append("source="); buf.append(source); buf.append(']'); return buf.toString(); }
15,821
public Node getNamedItemNS(String namespaceURI, String localName);
public Node getNamedItemNS(String namespaceURI, String localName);
15,822
public void setAction(Action a) { action_taken = a; revalidate(); repaint(); }
public void setAction(Action a) { action_taken = a; revalidate(); repaint(); }
15,823
public void setModel(ButtonModel newModel) { model = newModel; }
public void setModel(ButtonModel newModel) { model = newModel; }
15,824
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // otherwise pass the add onto the content pane. if (comp == rootPane) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JWindow directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // otherwise pass the add onto the content pane. if (comp == rootPane) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JWindow directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
15,825
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // otherwise pass the add onto the content pane. if (comp == rootPane) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JWindow directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
protected void addImpl(Component comp, Object constraints, int index) { // If we're adding the rootPane (initialization stages) use super.add. // otherwise pass the add onto the content pane. if (!initStageDone) super.addImpl(comp, constraints, index); else { if (isRootPaneCheckingEnabled()) throw new Error("Do not use add() on JWindow directly. Use " + "getContentPane().add() instead"); getContentPane().add(comp, constraints, index); } }
15,826
public Window(Window owner, GraphicsConfiguration gc) { this (); synchronized (getTreeLock()) { if (owner == null) throw new IllegalArgumentException ("owner must not be null"); parent = owner; owner.ownedWindows.add(new WeakReference(this)); } // FIXME: make this text visible in the window. SecurityManager s = System.getSecurityManager(); if (s != null && ! s.checkTopLevelWindow(this)) warningString = System.getProperty("awt.appletWarning"); if (gc != null && gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN) throw new IllegalArgumentException ("gc must be from a screen device"); if (gc == null) graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); else graphicsConfiguration = gc; }
Window() { this (); synchronized (getTreeLock()) { if (owner == null) throw new IllegalArgumentException ("owner must not be null"); parent = owner; owner.ownedWindows.add(new WeakReference(this)); } // FIXME: make this text visible in the window. SecurityManager s = System.getSecurityManager(); if (s != null && ! s.checkTopLevelWindow(this)) warningString = System.getProperty("awt.appletWarning"); if (gc != null && gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN) throw new IllegalArgumentException ("gc must be from a screen device"); if (gc == null) graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); else graphicsConfiguration = gc; }
15,827
public Window(Window owner, GraphicsConfiguration gc) { this (); synchronized (getTreeLock()) { if (owner == null) throw new IllegalArgumentException ("owner must not be null"); parent = owner; owner.ownedWindows.add(new WeakReference(this)); } // FIXME: make this text visible in the window. SecurityManager s = System.getSecurityManager(); if (s != null && ! s.checkTopLevelWindow(this)) warningString = System.getProperty("awt.appletWarning"); if (gc != null && gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN) throw new IllegalArgumentException ("gc must be from a screen device"); if (gc == null) graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); else graphicsConfiguration = gc; }
public Window(Window owner, GraphicsConfiguration gc) { visible = false; focusCycleRoot = true; setLayout(new BorderLayout()); synchronized (getTreeLock()) { if (owner == null) throw new IllegalArgumentException ("owner must not be null"); parent = owner; owner.ownedWindows.add(new WeakReference(this)); } // FIXME: make this text visible in the window. SecurityManager s = System.getSecurityManager(); if (s != null && ! s.checkTopLevelWindow(this)) warningString = System.getProperty("awt.appletWarning"); if (gc != null && gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN) throw new IllegalArgumentException ("gc must be from a screen device"); if (gc == null) graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); else graphicsConfiguration = gc; }
15,828
public Window(Window owner, GraphicsConfiguration gc) { this (); synchronized (getTreeLock()) { if (owner == null) throw new IllegalArgumentException ("owner must not be null"); parent = owner; owner.ownedWindows.add(new WeakReference(this)); } // FIXME: make this text visible in the window. SecurityManager s = System.getSecurityManager(); if (s != null && ! s.checkTopLevelWindow(this)) warningString = System.getProperty("awt.appletWarning"); if (gc != null && gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN) throw new IllegalArgumentException ("gc must be from a screen device"); if (gc == null) graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); else graphicsConfiguration = gc; }
public Window(Window owner, GraphicsConfiguration gc) { this (); addWindowFocusListener (new WindowAdapter () { if (owner == null) throw new IllegalArgumentException ("owner must not be null"); parent = owner; owner.ownedWindows.add(new WeakReference(this)); } // FIXME: make this text visible in the window. SecurityManager s = System.getSecurityManager(); if (s != null && ! s.checkTopLevelWindow(this)) warningString = System.getProperty("awt.appletWarning"); if (gc != null && gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN) throw new IllegalArgumentException ("gc must be from a screen device"); if (gc == null) graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); else graphicsConfiguration = gc; }
15,829