Update of /cvsroot/jaxme/JaxMe2/src/net/sf/jaxme/generator/util
In directory sc8-pr-cvs1:/tmp/cvs-serv5613/src/net/sf/jaxme/generator/util

Modified Files:
        DOMBuilder.java DOM.java 
Log Message:
Added customization framework. See docs/Customization.html for
details. Added Marty Kube to the list of project members. See
docs/Design.html.


Index: DOMBuilder.java
===================================================================
RCS file: /cvsroot/jaxme/JaxMe2/src/net/sf/jaxme/generator/util/DOMBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- DOMBuilder.java     4 Jan 2003 02:33:16 -0000       1.4
+++ DOMBuilder.java     21 Mar 2003 21:31:07 -0000      1.5
@@ -4,7 +4,8 @@
 import java.util.List;
 import java.util.Map;
 
-import net.sf.jaxme.util.DOMSerializer;
+import javax.xml.XMLConstants;
+
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -220,13 +221,14 @@
       String localName;
       String qName;
       if ("".equals(namespaceURI)  ||  namespaceURI == null) {
-        localName = qName = "xmlns";
+        localName = qName = XMLConstants.XMLNS_ATTRIBUTE;
       } else {
         localName = prefix;
-        qName = "xmlns:" + prefix;
+        qName = XMLConstants.XMLNS_ATTRIBUTE + ":" + prefix;
       }
         
-      Attr attr = nodeFactory.createAttributeNS(DOMSerializer.DOM_XMLNS_URI, qName);
+      Attr attr = nodeFactory.createAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
+                                                qName);
       attr.setNodeValue(namespaceURI);
       element.setAttributeNodeNS(attr);
       addLocatorMapNode(attr);

Index: DOM.java
===================================================================
RCS file: /cvsroot/jaxme/JaxMe2/src/net/sf/jaxme/generator/util/DOM.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- DOM.java    20 Feb 2003 21:02:03 -0000      1.7
+++ DOM.java    21 Mar 2003 21:31:07 -0000      1.8
@@ -5,6 +5,7 @@
 import java.util.Map;
 import java.util.NoSuchElementException;
 
+import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
@@ -13,7 +14,6 @@
 
 import net.sf.jaxme.generator.SchemaException;
 import net.sf.jaxme.generator.jaxb.impl.JAXBSchemaReader;
-import net.sf.jaxme.util.DOMSerializer;
 
 import org.apache.log4j.Logger;
 import org.w3c.dom.Document;
@@ -52,13 +52,13 @@
       NamedNodeMap nnm = pNode.getAttributes();
       for (int i = 0;  i < nnm.getLength();  i++) {
         Node n = nnm.item(i);
-        if (DOMSerializer.DOM_XMLNS_URI.equals(n.getNamespaceURI())) {
+        if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(n.getNamespaceURI())) {
           String uri = n.getNodeValue();
           if (uri == null) {
             uri = "";
           }
           if (pURI.equals(uri)) {
-            if ("xmlns".equals(n.getNodeName())) {
+            if (XMLConstants.XMLNS_ATTRIBUTE.equals(n.getNodeName())) {
               return "";
             } else {
               return n.getLocalName();
@@ -81,7 +81,7 @@
       NamedNodeMap nnm = pNode.getAttributes();
       for (int i = 0;  i < nnm.getLength();  i++) {
         Node n = nnm.item(i);
-        if (DOMSerializer.DOM_XMLNS_URI.equals(n.getNamespaceURI())  &&
+        if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(n.getNamespaceURI())  &&
             n.getLocalName().equals(pPrefix)) {
           String v = n.getNodeValue();
           return (v == null) ? "" : v;




-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Jaxme-jaxb-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxme-jaxb-dev

Reply via email to