Package com.dbxml.xml

Examples of com.dbxml.xml.QName


      byte[] b = UTF8.toUTF8(ch, start, length);
      builder.addEntry(Constants.OBJ_TEXT, b);
   }

   public void processingInstruction(String target, String data) {
      QName q = new QName(target);
      int symID = builder.addEntry(Constants.OBJ_BEGIN_PROCINST, q);
      byte[] b = UTF8.toUTF8(data);
      builder.addEntry(Constants.OBJ_TEXT, b);
      builder.addEntry(Constants.OBJ_END_PROCINST, symID);
   }
View Full Code Here


      builder.addEntry(Constants.OBJ_TEXT, b);
      builder.addEntry(Constants.OBJ_END_PROCINST, symID);
   }

   public void startElement(String namespaceURI, String localName, String qName, Attributes atts) {
      QName qname = new QName(qName, namespaceURI);
      int symID = builder.addEntry(Constants.OBJ_BEGIN_ELEMENT, qname);
      stack.push(new Integer(symID));

      int size = atts.getLength();
      for ( int i = 0; i < size; i++ ) {
         QName aq = new QName(atts.getQName(i), atts.getURI(i));
         int as = builder.addEntry(Constants.OBJ_BEGIN_ATTRIBUTE, aq);
         builder.addEntry(Constants.OBJ_TEXT, UTF8.toUTF8(atts.getValue(i)));
         builder.addEntry(Constants.OBJ_END_ATTRIBUTE, as);
      }
   }
View Full Code Here

      Integer symID = (Integer)stack.pop();
      builder.addEntry(Constants.OBJ_END_ELEMENT, symID.intValue());
   }

   public void notationDecl(String name, String publicID, String systemID) throws SAXException {
      QName qname = new QName(name);
      int symID = builder.addEntry(Constants.OBJ_BEGIN_NOTATION, qname);
      byte[] b = UTF8.toUTF8(publicID);
      builder.addEntry(Constants.OBJ_TEXT, b);
      b = UTF8.toUTF8(systemID);
      builder.addEntry(Constants.OBJ_TEXT, b);
View Full Code Here

      builder.addEntry(Constants.OBJ_TEXT, b);
      builder.addEntry(Constants.OBJ_END_NOTATION, symID);
   }

   public void unparsedEntityDecl(String name, String publicID, String systemID, String notation) throws SAXException {
      QName qname = new QName(name);
      int symID = builder.addEntry(Constants.OBJ_BEGIN_ENTITY, qname);
      byte[] b = UTF8.toUTF8(publicID);
      builder.addEntry(Constants.OBJ_TEXT, b);
      b = UTF8.toUTF8(systemID);
      builder.addEntry(Constants.OBJ_TEXT, b);
View Full Code Here

   public void endDocument(DocumentTableEntry entry) throws Exception {
   }

   public void beginElement(DocumentTableEntry entry) throws Exception {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      writer.print('<');
      writer.print(qname.getName());
      while ( processor.peek().getTypeID() == Constants.OBJ_BEGIN_ATTRIBUTE )
         attribute(processor.next());
      if ( processor.peek().getTypeID() == Constants.OBJ_END_ELEMENT ) {
         processor.next();
         writer.print("/>");
View Full Code Here

         writer.print('>');
   }

   public void endElement(DocumentTableEntry entry) throws Exception {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      writer.print("</");
      writer.print(qname.getName());
      writer.print('>');
   }
View Full Code Here

      writer.print('>');
   }

   public void attribute(DocumentTableEntry entry) throws Exception {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      String uri = qname.getURI();
      writer.print(' ');
      writer.print(qname.getName());
      writer.print("=\"");
      do {
         entry = processor.next();
         if ( entry.getTypeID() == Constants.OBJ_TEXT ) {
            int valID = entry.getValID();
View Full Code Here

      writer.print('\"');
   }

   public void procInst(DocumentTableEntry entry) throws Exception {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      entry = processor.next();
      int valID = entry.getValID();
      processor.next(); // Eat the OBJ_END_PROCINST
      writer.print("<?");
      writer.print(qname.getName());
      writer.print(' ');
      UTF8.toWriter(table.getValue(valID), writer);
      writer.println("?>");
   }
View Full Code Here

   public void beginElement(DocumentTableEntry entry) throws Exception {
      if ( nsReporting )
         prefixStack.push(new HashMap());

      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      String uri = qname.getSAXURI();

      if ( processor.peek().getTypeID() == Constants.OBJ_BEGIN_ATTRIBUTE )
         attrs = new AttributesImpl();
      else
         attrs = EmptyAttributes;

      while ( processor.peek().getTypeID() == Constants.OBJ_BEGIN_ATTRIBUTE )
         attribute(processor.next());

      content.startElement(uri, qname.getLocalName(), qname.getName(), attrs);
   }
View Full Code Here

      content.startElement(uri, qname.getLocalName(), qname.getName(), attrs);
   }

   public void endElement(DocumentTableEntry entry) throws Exception {
      int symID = entry.getValID();
      QName qname = symbols.getQName(symID);
      String uri = qname.getSAXURI();
      content.endElement(uri, qname.getLocalName(), qname.getName());

      if ( nsReporting ) {
         Map prefixMap = (Map)prefixStack.pop();
         if ( prefixMap.size() > 0 ) {
            Iterator keys = prefixMap.keySet().iterator();
View Full Code Here

TOP

Related Classes of com.dbxml.xml.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.