1 17 package org.apache.ws.jaxme.xs.xml.impl; 18 19 import org.apache.ws.jaxme.xs.XSParser; 20 import org.apache.ws.jaxme.xs.xml.*; 21 import org.xml.sax.Attributes ; 22 import org.xml.sax.SAXException ; 23 import org.xml.sax.helpers.AttributesImpl ; 24 25 26 47 public class XsTOpenAttrsImpl extends XsObjectImpl implements XsTOpenAttrs { 48 private AttributesImpl attributes = new AttributesImpl (); 49 50 protected XsTOpenAttrsImpl(XsObject pParent) { 51 super(pParent); 52 } 53 54 public Attributes getOpenAttributes() { 55 return attributes; 56 } 57 58 64 public boolean setAttribute(String pQName, String pNamespaceURI, String pLocalName, String pValue) 65 throws SAXException { 66 if (pNamespaceURI == null || "".equals(pNamespaceURI)) { 67 return false; 68 } else if (XSParser.XML_SCHEMA_URI.equals(pNamespaceURI)) { 69 throw new IllegalStateException ("Unknown attribute in " + getClass().getName() + ": " + pQName); 70 } 71 attributes.addAttribute(pNamespaceURI, pLocalName, pQName, "CDATA", pValue); 72 return true; 73 } 74 } 75 | Popular Tags |