Examples of Locator


Examples of org.xml.sax.Locator

//    }
//    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

Examples of org.xml.sax.Locator

        }

        // 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

Examples of org.xml.sax.Locator

         */
        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

Examples of org.xml.sax.Locator

    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

Examples of org.xml.sax.Locator

      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

Examples of org.xml.sax.Locator

      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

Examples of org.xml.sax.Locator

    final XsAnyURI schemaLocation = pInclude.getSchemaLocation();
    if (schemaLocation == null) {
      throw new LocSAXException("Invalid include: Missing 'schemaLocation' attribute.",
          pInclude.getLocator());
    }
    Locator locator = pInclude.getLocator();
    XsESchema includedSchema = parseSyntax(locator, schemaLocation.toString());
    XsAnyURI incNamespace = includedSchema.getTargetNamespace();
    if (incNamespace == null) {
      if (pIncludingSchema.getTargetNamespace() != null) {
        includedSchema.setTargetNamespace(pIncludingSchema.getTargetNamespace());
View Full Code Here

Examples of org.xml.sax.Locator

        public DTDAttribute(String pName, String pType, String pMode, String pValue) {
          name = pName;
            type = pType;
            mode = pMode;
            value = pValue;
            Locator l = DTDParser.this.getLocator();
            if (l == null) {
              loc = null;
            } else {
              loc = new LocatorImpl(l);
            }
View Full Code Here

Examples of org.xml.sax.Locator

          name = pName;
        }
        /** Sets the elements content model.
         */
        public void setModel(String pModel) {
            Locator l = DTDParser.this.getLocator();
          if (l == null) {
            loc = null;
            } else {
              loc = new LocatorImpl(l);
            }
View Full Code Here

Examples of org.xml.sax.Locator

   }

   /** Returns a locator implementation. */
   private LocatorImpl getLocatorImpl(LocatorImpl fillin) {

      Locator here = fErrorReporter.getLocator();
      if (fillin == null)
         return new LocatorImpl(here);
      fillin.setPublicId(here.getPublicId());
      fillin.setSystemId(here.getSystemId());
      fillin.setLineNumber(here.getLineNumber());
      fillin.setColumnNumber(here.getColumnNumber());
      return fillin;

   } // getLocatorImpl(LocatorImpl):LocatorImpl
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.