Examples of NamespaceSupport


Examples of org.apache.jackrabbit.vault.util.xml.xerces.util.NamespaceSupport

     * @param namespaces
     */
    public void setNamespaces(boolean namespaces) {
        fNamespaces = namespaces;
        if (fNSBinder == null) {
            fNSBinder = new NamespaceSupport();
            fLocalNSBinder = new NamespaceSupport();
            fSymbolTable = new SymbolTable();
        }
    }
View Full Code Here

Examples of org.apache.ws.jaxme.util.NamespaceSupport

    return new AttributesImpl();
  }

  protected String getAttributeQName(JMXmlSerializer.Data pData, String pURI, String pLocalName)
      throws SAXException {
    NamespaceSupport nss = pData.getNamespaceSupport();
    String prefix = nss.getAttributePrefix(pURI);
    if (prefix == null) {
      String preferredPrefix = getPreferredPrefix(pURI);
      if (preferredPrefix == null  ||  preferredPrefix.length() == 0) {
        preferredPrefix = "p";
      }
View Full Code Here

Examples of org.apache.ws.jaxme.util.NamespaceSupport

    }
  }

  protected String getElementQName(JMXmlSerializer.Data pData, String pURI,
                             String pLocalName) throws SAXException {
    NamespaceSupport nss = pData.getNamespaceSupport();
    String prefix = nss.getPrefix(pURI);
    if (prefix == null) {
      prefix = pData.getNewPrefix(pURI, getPreferredPrefix(pURI));
      pData.getContentHandler().startPrefixMapping(prefix, pURI);
    }
    if (prefix.length() == 0) {
View Full Code Here

Examples of org.apache.ws.jaxme.util.NamespaceSupport

    handler.endElement(pNamespaceURI, pLocalName, qName);
  }

  public void marshal(JMXmlSerializer.Data pData, QName pName, Object pElement)
      throws SAXException {
    NamespaceSupport nss = pData.getNamespaceSupport();
    int context = nss.getContext();
    ContentHandler handler = pData.getContentHandler();
    String uri = pName.getNamespaceURI();
    if (uri == null) uri = "";
    String name = pName.getLocalPart();
    String qName = getElementQName(pData, uri, name);
    handler.startElement(uri, name, qName,
                         getAttributes(pData, pElement));
    marshalChilds(pData, pElement);
    handler.endElement(uri, name, qName);
    for (;;) {
      String prefix = nss.setContext(context);
      if (prefix == null) {
        break;
      }
      handler.endPrefixMapping(prefix);
    }
View Full Code Here

Examples of org.apache.xerces.util.NamespaceSupport

        try {
            fNamespaceContext = (NamespaceContext)componentManager.getProperty(NAMESPACE_CONTEXT);
        }
        catch (XMLConfigurationException e) { }
        if (fNamespaceContext == null) {
            fNamespaceContext = new NamespaceSupport();
        }
        fNamespaceContext.reset();
       
        // setup dispatcher
        setScannerState(SCANNER_STATE_XML_DECL);
View Full Code Here

Examples of org.apache.xerces.util.NamespaceSupport

            fNamespaceSupport = (NamespaceSupport)namespaceContext;
        }
        else {
            // REVISIT: this is a hack for the case user inserts component before
            //          DTD validator
            fNamespaceSupport = new NamespaceSupport();
        }

        if (fDocumentHandler != null) {
            fDocumentHandler.startDocument(locator, encoding, fNamespaceSupport, augs);
        }
View Full Code Here

Examples of org.apache.xerces.util.NamespaceSupport

            Object[] attrs = null;
            facet = DOMUtil.getLocalName(content);
            if (facet.equals(SchemaSymbols.ELT_ENUMERATION)) {
                attrs = fAttrChecker.checkAttributes(content, false, schemaDoc, hasQName);
                String enumVal = (String)attrs[XSAttributeChecker.ATTIDX_VALUE];
                NamespaceSupport nsDecls = (NamespaceSupport)attrs[XSAttributeChecker.ATTIDX_ENUMNSDECLS];

                // for NOTATION types, need to check whether there is a notation
                // declared with the same name as the enumeration value.
                if (baseValidator.getVariety() == XSSimpleType.VARIETY_ATOMIC &&
                    baseValidator.getPrimitiveKind() == XSSimpleType.PRIMITIVE_NOTATION) {
View Full Code Here

Examples of org.apache.xerces.util.NamespaceSupport

    }

    // this initializes a newly-created serializer
    private void initSerializer(XMLSerializer ser) {
        ser.fNamespaces = true;
        ser.fNSBinder = new NamespaceSupport();
        ser.fLocalNSBinder = new NamespaceSupport();
        ser.fSymbolTable = new SymbolTable();
        ser.fFeatures = new Hashtable();
        ser.fFeatures.put(Constants.DOM_NAMESPACES, Boolean.TRUE);
        ser.fFeatures.put(Constants.DOM_NORMALIZE_CHARACTERS, Boolean.FALSE);
    ser.fFeatures.put(Constants.DOM_VALIDATE_IF_SCHEMA, Boolean.FALSE);
View Full Code Here

Examples of org.apache.xerces.util.NamespaceSupport

            Object[] attrs = null;
            facet = DOMUtil.getLocalName(content);
            if (facet.equals(SchemaSymbols.ELT_ENUMERATION)) {
                attrs = fAttrChecker.checkAttributes(content, false, schemaDoc, hasQName);
                String enumVal = (String)attrs[XSAttributeChecker.ATTIDX_VALUE];
                NamespaceSupport nsDecls = (NamespaceSupport)attrs[XSAttributeChecker.ATTIDX_ENUMNSDECLS];

                // for NOTATION types, need to check whether there is a notation
                // declared with the same name as the enumeration value.
                if (baseValidator.getVariety() == XSSimpleType.VARIETY_ATOMIC &&
                    baseValidator.getPrimitiveKind() == XSSimpleType.PRIMITIVE_NOTATION) {
View Full Code Here

Examples of org.apache.xerces.util.NamespaceSupport

        fAnonNum = 1000;
        fIDMap = new HashMap();
        fDefined = new Vector();
        fIndent = 0;
        fPSVINamespaceContext = new NamespaceSupport();
    } // reset(XMLComponentManager)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.