Thread: [Practicalxml-commits] SF.net SVN: practicalxml:[32] trunk/src/main/java/net/sf/practicalxml/ Schem
Brought to you by:
kdgregory
From: Auto-Generated S. C. M. <pra...@li...> - 2008-11-18 01:51:49
|
Revision: 32 http://practicalxml.svn.sourceforge.net/practicalxml/?rev=32&view=rev Author: kdgregory Date: 2008-11-18 01:51:39 +0000 (Tue, 18 Nov 2008) Log Message: ----------- newSchema() - remove println() Modified Paths: -------------- trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java Modified: trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java =================================================================== --- trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java 2008-10-12 16:57:10 UTC (rev 31) +++ trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java 2008-11-18 01:51:39 UTC (rev 32) @@ -67,8 +67,6 @@ combineSchema(combined, source); } - System.out.println(OutputUtil.indentedString(combined.getOwnerDocument(), 4)); - try { synchronized (factory) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Auto-Generated S. C. M. <pra...@li...> - 2008-12-09 18:49:52
|
Revision: 49 http://practicalxml.svn.sourceforge.net/practicalxml/?rev=49&view=rev Author: kmudrick Date: 2008-12-09 18:49:48 +0000 (Tue, 09 Dec 2008) Log Message: ----------- Fix for namespaced schemas Modified Paths: -------------- trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java Modified: trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java =================================================================== --- trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java 2008-12-09 12:41:54 UTC (rev 48) +++ trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java 2008-12-09 18:49:48 UTC (rev 49) @@ -5,8 +5,10 @@ import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; +import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; @@ -66,7 +68,7 @@ { combineSchema(combined, source); } - + try { synchronized (factory) @@ -91,6 +93,15 @@ private static void combineSchema(Element newRoot, InputSource source) { Document doc = ParseUtil.parse(source); + NamedNodeMap attributeMap = doc.getDocumentElement().getAttributes(); + if (attributeMap != null) + { + for (int i=0; i<attributeMap.getLength(); i++) + { + Attr attribute = (Attr) attributeMap.item(i); + newRoot.setAttribute(attribute.getName(), attribute.getValue()); + } + } Element root = doc.getDocumentElement(); if (!DomUtil.isNamed(root, SCHEMA_NS, SCHEMA_ROOT)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Auto-Generated S. C. M. <pra...@li...> - 2008-12-29 02:57:47
|
Revision: 67 http://practicalxml.svn.sourceforge.net/practicalxml/?rev=67&view=rev Author: kdgregory Date: 2008-12-29 02:57:43 +0000 (Mon, 29 Dec 2008) Log Message: ----------- SchemaUtil: change access level of internal nested classes Modified Paths: -------------- trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java Modified: trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java =================================================================== --- trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java 2008-12-29 02:52:04 UTC (rev 66) +++ trunk/src/main/java/net/sf/practicalxml/SchemaUtil.java 2008-12-29 02:57:43 UTC (rev 67) @@ -230,10 +230,9 @@ * are different under 1.6, it will be moved into its own package and * accessed via a factory. * <p> - * Defined as protected -- as are internal methods -- so that it can be - * tested independently. + * Defined as package protected so that it can be tested independently. */ - protected static class SchemaManager + static class SchemaManager { private HashMap<String,Document> _documents = new HashMap<String,Document>(); @@ -319,9 +318,9 @@ * namespace URLs, and schemas with no target namespace are greater-than * those with (since they cannot be imported). * <p> - * Defined as protected so that it can be tested independently. + * Defined as package-protected so that it can be tested independently. */ - protected static class SchemaComparator + static class SchemaComparator implements Comparator<Document> { public int compare(Document o1, Document o2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |