Package org.xml.sax

Examples of org.xml.sax.Locator


        Object cur = currentElement();
        Object scope = (cur instanceof ClassMetaData)
            ? ((ClassMetaData) cur).getDescribedType() : null;
        meta.setSource(getSourceFile(), scope, meta.SRC_XML);
        Locator locator = getLocation().getLocator();
        if (locator != null) {
            meta.setLineNumber(Numbers.valueOf(locator.getLineNumber()));
            meta.setColNumber(Numbers.valueOf(locator.getColumnNumber()));
        }
        if (isMetaDataMode())
            meta.setSourceMode(MODE_META);
        else if (isMappingMode())
            meta.setSourceMode(MODE_MAPPING);
View Full Code Here


      ((NodeConsumer) m_contentHandler).setOriginatingNode(node);
    }
               
                if (node instanceof Locator)
                {
                        Locator loc = (Locator)node;
                        m_locator.setColumnNumber(loc.getColumnNumber());
                        m_locator.setLineNumber(loc.getLineNumber());
                        m_locator.setPublicId(loc.getPublicId());
                        m_locator.setSystemId(loc.getSystemId());
                }
                else
                {
                        m_locator.setColumnNumber(0);
      m_locator.setLineNumber(0);
View Full Code Here

     *
     * @throws org.xml.sax.SAXException
     */
    protected void startNode(Node node) throws org.xml.sax.SAXException {
        if (node instanceof Locator) {
            Locator loc = (Locator) node;
            fLocator.setColumnNumber(loc.getColumnNumber());
            fLocator.setLineNumber(loc.getLineNumber());
            fLocator.setPublicId(loc.getPublicId());
            fLocator.setSystemId(loc.getSystemId());
        } else {
            fLocator.setColumnNumber(0);
            fLocator.setLineNumber(0);
        }

View Full Code Here

      ((NodeConsumer) m_contentHandler).setOriginatingNode(node);
    }
               
                if (node instanceof Locator)
                {
                        Locator loc = (Locator)node;
                        m_locator.setColumnNumber(loc.getColumnNumber());
                        m_locator.setLineNumber(loc.getLineNumber());
                        m_locator.setPublicId(loc.getPublicId());
                        m_locator.setSystemId(loc.getSystemId());
                }
                else
                {
                        m_locator.setColumnNumber(0);
      m_locator.setLineNumber(0);
View Full Code Here

//    }
//    TODO: </REVIEW>
               
                if (node instanceof Locator)
                {
                        Locator loc = (Locator)node;
                        m_locator.setColumnNumber(loc.getColumnNumber());
                        m_locator.setLineNumber(loc.getLineNumber());
                        m_locator.setPublicId(loc.getPublicId());
                        m_locator.setSystemId(loc.getSystemId());
                }
                else
                {
                        m_locator.setColumnNumber(0);
      m_locator.setLineNumber(0);
View Full Code Here

        }

        // stylesheet.setDOMBackPointer(handler.getOriginatingNode());
        // ***** Note that we're assigning an empty locator. Is this necessary?
        SAXSourceLocator slocator = new SAXSourceLocator();
        Locator locator = handler.getLocator();
        if(null != locator)
        {
          slocator.setLineNumber(locator.getLineNumber());
          slocator.setColumnNumber(locator.getColumnNumber());
          slocator.setPublicId(locator.getPublicId());
          slocator.setSystemId(locator.getSystemId());
        }
        stylesheet.setLocaterInfo(slocator);
        stylesheet.setPrefixes(handler.getNamespaceSupport());
        handler.pushStylesheet(stylesheet);

View Full Code Here

         */
        public final void begin(final String namespace, final String name,
                final Attributes attributes) {
            org.apache.commons.logging.Log log = LogFactory.
                getLog(SCXMLParser.class);
            Locator l = digester.getDocumentLocator();
            String identifier = l.getSystemId();
            if (identifier == null) {
                identifier = l.getPublicId();
            }
            StringBuffer sb = new StringBuffer();
            sb.append("Ignoring element <").append(name).
                append("> in namespace \"").append(namespace).
                append("\" at ").append(identifier).append(":").
                append(l.getLineNumber()).append(":").
                append(l.getColumnNumber()).append(" and digester match \"").
                append(digester.getMatch()).append("\"");
            log.warn(sb.toString());
        }
View Full Code Here

    query = attrs.getValue(getUri(), "query");
    keyColumnName = attrs.getValue(getUri(), "key-column");

    if (query != null && keyColumnName == null)
    {
      Locator locator = getLocator();
      logger.warn(String.format("Required parameter 'key-column' is missing for parameter '%s'. [%d:%d]",
          getName(), locator.getLineNumber(), locator.getColumnNumber()));
      keyColumnName = "";
    }

    valueColumnName = attrs.getValue(getUri(), "value-column");
    if (valueColumnName == null)
View Full Code Here

      mySchema.redefine(factory.newXSType(mySchema, type));
    } else if (pChild instanceof XsTComplexType) {
      XsTComplexType type = (XsTComplexType) pChild;
      mySchema.redefine(factory.newXSType(mySchema, type));
    } else {
      Locator locator = (pChild instanceof XsObject) ? ((XsObject) pChild).getLocator() : pRedefine.getLocator();
      throw new LocSAXException("Unknown type for redefinition: " + pChild.getClass().getName() +
          ", perhaps you should handle this in a subclass?", locator);
    }
  }
View Full Code Here

      mySchema.add(factory.newXSAttribute(mySchema, attribute));
    } else if (pChild instanceof XsENotation) {
      XsENotation notation = (XsENotation) pChild;
      mySchema.add(factory.newXSNotation(mySchema, notation));
    } else {
      Locator locator = (pChild instanceof XsObject) ?
          ((XsObject) pChild).getLocator() : pSyntaxSchema.getLocator();
          throw new LocSAXException("Unknown child type: " + pChild.getClass().getName() +
              ", perhaps you should handle this in a subclass?", locator);
    }
  }
View Full Code Here

TOP

Related Classes of org.xml.sax.Locator

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.