Package mf.javax.xml.namespace

Examples of mf.javax.xml.namespace.QName


     * @param prefix The prefix for this namespace.
     * @return A QName for the attribute that declares this namespace.
     */
    private static QName makeAttributeQName(String prefix) {
        if (prefix == null || prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
            return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, XMLConstants.XMLNS_ATTRIBUTE, XMLConstants.DEFAULT_NS_PREFIX);
        }
        return new QName(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, prefix, XMLConstants.XMLNS_ATTRIBUTE);
    }
View Full Code Here


     * @throws java.lang.IllegalStateException if the combination of set fields
     *    does not match one of the eight defined XML Schema builtin date/time datatypes.
     */
    public String toXMLFormat() {

        QName typekind = getXMLSchemaType();

        String formatString = null;
        if (typekind == DatatypeConstants.DATETIME) {
            formatString = "%Y-%M-%DT%h:%m:%s"+ "%z";
        }
View Full Code Here

    public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException {
        try {
            // Write end tags.
            writer.write("</");
            QName name = getName();
            String prefix = name.getPrefix();
            if (prefix != null && prefix.length() > 0) {
                writer.write(prefix);
                writer.write(':');
            }
            writer.write(name.getLocalPart());
            writer.write('>');
        }
        catch (IOException ioe) {
            throw new XMLStreamException(ioe);
        }
View Full Code Here

   
    public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException {
        try {
            // Write start tag.
            writer.write('<');
            QName name = getName();
            String prefix = name.getPrefix();
            if (prefix != null && prefix.length() > 0) {
                writer.write(prefix);
                writer.write(':');
            }
            writer.write(name.getLocalPart());
            // Write namespace declarations.
            Iterator nsIter = getNamespaces();
            while (nsIter.hasNext()) {
                Namespace ns = (Namespace) nsIter.next();
                writer.write(' ');
View Full Code Here

        return (get(key) != null);
    }
   
    public Object get(Object key) {
        if (key instanceof QName) {
            final QName name = (QName) key;
            String namespaceURI = name.getNamespaceURI();
            if (XMLConstants.NULL_NS_URI.equals(namespaceURI)) {
                namespaceURI = null;
            }
            String localPart = name.getLocalPart();
            return itemByName(namespaceURI, localPart);
        }
        return null;
    }
View Full Code Here

        if (fEntrySet == null) {
            final int length = getLength();
            final XSNamedMapEntry[] entries = new XSNamedMapEntry[length];
            for (int i = 0; i < length; ++i) {
                XSObject xso = item(i);
                entries[i] = new XSNamedMapEntry(new QName(xso.getNamespace(), xso.getName()), xso);
            }
            // Create a view of this immutable map.
            fEntrySet = new AbstractSet() {
                public Iterator iterator() {
                    return new Iterator() {
View Full Code Here

        fLocation = location;
    }
   
    public Attribute createAttribute(String prefix, String namespaceURI,
            String localName, String value) {
        return createAttribute(new QName(namespaceURI, localName, prefix), value);
    }
View Full Code Here

            String localName, String value) {
        return createAttribute(new QName(namespaceURI, localName, prefix), value);
    }

    public Attribute createAttribute(String localName, String value) {
        return createAttribute(new QName(localName), value);
    }
View Full Code Here

        return createStartElement(name, attributes, namespaces, null);
    }
   
    public StartElement createStartElement(String prefix, String namespaceUri,
            String localName) {
        return createStartElement(new QName(namespaceUri, localName, prefix), null, null);
    }
View Full Code Here

        return createStartElement(new QName(namespaceUri, localName, prefix), null, null);
    }
 
    public StartElement createStartElement(String prefix, String namespaceUri,
            String localName, Iterator attributes, Iterator namespaces) {
        return createStartElement(new QName(namespaceUri, localName, prefix), attributes, namespaces);
    }
View Full Code Here

TOP

Related Classes of mf.javax.xml.namespace.QName

Copyright © 2018 www.massapicom. 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.