Examples of NamespaceMappings


Examples of com.sun.org.apache.xml.internal.serializer.NamespaceMappings

                    _handler.namespaceAfterStartElement(prefix, uriAttr);
                }
            }

            // Process all non-namespace attributes next
            NamespaceMappings nm = new NamespaceMappings();
            for (int i = 0; i < length; i++) {
                final Node attr = map.item(i);
                final String qnameAttr = attr.getNodeName();

                // Is this a regular attribute?
                if (!qnameAttr.startsWith(XMLNS_PREFIX)) {
                    final String uriAttr = attr.getNamespaceURI();
                    // Uri may be implicitly declared
                    if (uriAttr != null && !uriAttr.equals(EMPTYSTRING) ) {
                        colon = qnameAttr.lastIndexOf(':');

                        // Fix for bug 26319
                        // For attributes not given an prefix explictly
                        // but having a namespace uri we need
                        // to explicitly generate the prefix
                        String newPrefix = nm.lookupPrefix(uriAttr);
                        if (newPrefix == null)
                            newPrefix = nm.generateNextPrefix();
                        prefix = (colon > 0) ? qnameAttr.substring(0, colon)
                            : newPrefix;
                        _handler.namespaceAfterStartElement(prefix, uriAttr);
                        _handler.addAttribute((prefix + ":" + qnameAttr),
                            attr.getNodeValue());
View Full Code Here

Examples of com.sun.org.apache.xml.internal.serializer.NamespaceMappings

                        // not sure if this line of code ever works
                        namespace = dom.lookupNamespace(node, prefix);
                    }
                    catch(RuntimeException e) {
                        handler.flushPending()// need to flush or else can't get namespacemappings
                        NamespaceMappings nm = handler.getNamespaceMappings();
                        namespace = nm.lookupNamespace(prefix);
                        if (namespace == null) {
                            runTimeError(NAMESPACE_PREFIX_ERR,prefix);
                        }
                    }
                }
View Full Code Here

Examples of com.sun.org.apache.xml.internal.serializer.NamespaceMappings

        _handler.namespaceAfterStartElement(prefix, uriAttr);
    }
      }
           
      // Process all non-namespace attributes next
            NamespaceMappings nm = new NamespaceMappings();
      for (int i = 0; i < length; i++) {
    final Node attr = map.item(i);
    final String qnameAttr = attr.getNodeName();

                // Is this a regular attribute?
    if (!qnameAttr.startsWith(XMLNS_PREFIX)) {
        final String uriAttr = attr.getNamespaceURI();
        // Uri may be implicitly declared
        if (uriAttr != null && !uriAttr.equals(EMPTYSTRING) ) { 
      colon = qnameAttr.lastIndexOf(':');
                          
                        // Fix for bug 26319
                        // For attributes not given an prefix explictly
                        // but having a namespace uri we need
                        // to explicitly generate the prefix
                        String newPrefix = nm.lookupPrefix(uriAttr);
                        if (newPrefix == null)
                            newPrefix = nm.generateNextPrefix();
      prefix = (colon > 0) ? qnameAttr.substring(0, colon)
          : newPrefix;
      _handler.namespaceAfterStartElement(prefix, uriAttr);
            _handler.addAttribute((prefix + ":" + qnameAttr),
                            attr.getNodeValue());
View Full Code Here

Examples of com.sun.org.apache.xml.internal.serializer.NamespaceMappings

                        // not sure if this line of code ever works
                        namespace = dom.lookupNamespace(node, prefix);
                    }
                    catch(RuntimeException e) {
                        handler.flushPending()// need to flush or else can't get namespacemappings
                        NamespaceMappings nm = handler.getNamespaceMappings();
                        namespace = nm.lookupNamespace(prefix);
                        if (namespace == null) {
                            runTimeError(NAMESPACE_PREFIX_ERR,prefix);
                        }
                    }
                }
View Full Code Here

Examples of com.sun.org.apache.xml.internal.serializer.NamespaceMappings

                    _handler.namespaceAfterStartElement(prefix, uriAttr);
                }
            }

            // Process all non-namespace attributes next
            NamespaceMappings nm = new NamespaceMappings();
            for (int i = 0; i < length; i++) {
                final Node attr = map.item(i);
                final String qnameAttr = attr.getNodeName();

                // Is this a regular attribute?
                if (!qnameAttr.startsWith(XMLNS_PREFIX)) {
                    final String uriAttr = attr.getNamespaceURI();
                    // Uri may be implicitly declared
                    if (uriAttr != null && !uriAttr.equals(EMPTYSTRING) ) {
                        colon = qnameAttr.lastIndexOf(':');

                        // Fix for bug 26319
                        // For attributes not given an prefix explictly
                        // but having a namespace uri we need
                        // to explicitly generate the prefix
                        String newPrefix = nm.lookupPrefix(uriAttr);
                        if (newPrefix == null)
                            newPrefix = nm.generateNextPrefix();
                        prefix = (colon > 0) ? qnameAttr.substring(0, colon)
                            : newPrefix;
                        _handler.namespaceAfterStartElement(prefix, uriAttr);
                        _handler.addAttribute((prefix + ":" + qnameAttr),
                            attr.getNodeValue());
View Full Code Here

Examples of com.sun.org.apache.xml.internal.serializer.NamespaceMappings

                        // not sure if this line of code ever works
                        namespace = dom.lookupNamespace(node, prefix);
                    }
                    catch(RuntimeException e) {
                        handler.flushPending()// need to flush or else can't get namespacemappings
                        NamespaceMappings nm = handler.getNamespaceMappings();
                        namespace = nm.lookupNamespace(prefix);
                        if (namespace == null) {
                            runTimeError(NAMESPACE_PREFIX_ERR,prefix);
                        }
                    }
                }
View Full Code Here

Examples of com.sun.org.apache.xml.internal.serializer.NamespaceMappings

                        // not sure if this line of code ever works
                        namespace = dom.lookupNamespace(node, prefix);
                    }
                    catch(RuntimeException e) {
                        handler.flushPending()// need to flush or else can't get namespacemappings
                        NamespaceMappings nm = handler.getNamespaceMappings();
                        namespace = nm.lookupNamespace(prefix);
                        if (namespace == null) {
                            runTimeError(NAMESPACE_PREFIX_ERR,prefix);
                        }
                    }
                }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.name.NamespaceMappings

public class NamespaceRegistryImpl implements NamespaceRegistry {

    private final NamespaceMappings nsMappings;

    public NamespaceRegistryImpl(ContentSession session) {
        this.nsMappings = new NamespaceMappings(session);
    }
View Full Code Here

Examples of org.apache.xml.serializer.NamespaceMappings

        String prefix = dtm.getNodeNameX(namespace);

        if ((uri != null && uri.length() > 0) && (null != prefix))
        {
            String foundURI;
            NamespaceMappings ns = handler.getNamespaceMappings();
            if (ns != null)
            {

                foundURI = ns.lookupNamespace(prefix);
                if ((null == foundURI) || !foundURI.equals(uri))
                {
                    handler.startPrefixMapping(prefix, uri, false);
                }
            }
View Full Code Here

Examples of org.apache.xml.serializer.NamespaceMappings

        _handler.namespaceAfterStartElement(prefix, uriAttr);
    }
      }
           
      // Process all non-namespace attributes next
            NamespaceMappings nm = new NamespaceMappings();
      for (int i = 0; i < length; i++) {
    final Node attr = map.item(i);
    final String qnameAttr = attr.getNodeName();

                // Is this a regular attribute?
    if (!qnameAttr.startsWith(XMLNS_PREFIX)) {
        final String uriAttr = attr.getNamespaceURI();
        // Uri may be implicitly declared
        if (uriAttr != null && !uriAttr.equals(EMPTYSTRING) ) { 
      colon = qnameAttr.lastIndexOf(':');
                          
                        // Fix for bug 26319
                        // For attributes not given an prefix explictly
                        // but having a namespace uri we need
                        // to explicitly generate the prefix
                        String newPrefix = nm.lookupPrefix(uriAttr);
                        if (newPrefix == null)
                            newPrefix = nm.generateNextPrefix();
      prefix = (colon > 0) ? qnameAttr.substring(0, colon)
          : newPrefix;
      _handler.namespaceAfterStartElement(prefix, uriAttr);
            _handler.addAttribute((prefix + ":" + qnameAttr),
                            attr.getNodeValue());
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.