Changeset 15
- Timestamp:
- 07/22/05 11:49:34 (3 years ago)
- Files:
-
- trunk/src/net/schst/XJConf/NamespaceDefinitions.java (modified) (1 diff)
- trunk/src/net/schst/XJConf/XmlReader.java (modified) (4 diffs)
- trunk/src/net/schst/XJConf/ext/XInclude.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/net/schst/XJConf/NamespaceDefinitions.java
r1 r15 94 94 return amount; 95 95 } 96 97 /** 98 * Append more namespace definitions to the current 99 * definitions. Can be used if namespace definitions are read from 100 * more than one file. 101 * 102 * @param namespaceDefs 103 */ 104 public void appendNamespaceDefinitions(NamespaceDefinitions nsDefs) { 105 String namespace; 106 NamespaceDefinition nsDef; 107 108 for (Iterator iter = nsDefs.getDefinedNamespaces().iterator(); iter.hasNext();) { 109 namespace = (String) iter.next(); 110 nsDef = nsDefs.getNamespaceDefinition(namespace); 111 this.addNamespaceDefinition(namespace, nsDef); 112 } 113 } 96 114 } trunk/src/net/schst/XJConf/XmlReader.java
r14 r15 69 69 private SAXParserFactory parserFactory = null; 70 70 71 71 /** 72 * Classloader that will be used for extensions 73 * and dynamically created classes 74 */ 72 75 private ClassLoader loader = this.getClass().getClassLoader(); 73 76 77 /** 78 * Constructor 79 */ 74 80 public XmlReader() { 75 81 super(); 76 82 } 77 83 84 /** 85 * Constructor 86 * 87 * You may pass a classloader to the constructor which will be 88 * used to: 89 * - load extension classes 90 * - load dynamically created clases 91 * 92 * @param loader 93 */ 78 94 public XmlReader(ClassLoader loader) { 79 95 super(); … … 81 97 } 82 98 83 84 99 /** 85 100 * Set the tag definitions … … 98 113 } 99 114 115 /** 116 * Add more namespacedefinitions to the currently 117 * added definitions. 118 * 119 * This is useful, when your namespace definitions 120 * are distributed among different files. 121 * 122 * @param defs namespace definitions 123 */ 124 public void addTagDefinitions(NamespaceDefinitions defs) { 125 if (this.tagDefs == null) { 126 this.setTagDefinitions(defs); 127 return; 128 } 129 this.tagDefs.appendNamespaceDefinitions(defs); 130 } 131 100 132 /** 101 133 * Add a new extension … … 241 273 namespaceURI = "__default"; 242 274 } 243 275 244 276 // ignore the root tag 245 277 if (this.depth == 0) { trunk/src/net/schst/XJConf/ext/XInclude.java
r10 r15 18 18 */ 19 19 private String namespace = "http://www.w3.org/2001/XInclude"; 20 20 21 /** 22 * Get the namspace URI 23 */ 21 24 public String getNamespace() { 22 25 return this.namespace;
