Examples of ElementImpl


Examples of client.net.sf.saxon.ce.tree.linked.ElementImpl

                getConfiguration().getDocumentPool().add(rawDoc, key);
                DocumentImpl includedDoc = pss.loadStylesheetModule(rawDoc);

                // allow the included document to use "Literal Result Element as Stylesheet" syntax

                ElementImpl outermost = includedDoc.getDocumentElement();

                if (outermost instanceof LiteralResultElement) {
                    includedDoc = ((LiteralResultElement)outermost)
                            .makeStylesheet(getPreparedStylesheet());
                    outermost = includedDoc.getDocumentElement();
View Full Code Here

Examples of com.google.dart.engine.internal.element.ElementImpl

    try {
      String[] components = location.getComponents();
      Source source = computeSourceFromEncoding(components[0]);
      String sourceName = source.getShortName();
      if (AnalysisEngine.isDartFileName(sourceName)) {
        ElementImpl element = (ElementImpl) computeLibraryElement(source);
        for (int i = 1; i < components.length; i++) {
          if (element == null) {
            return null;
          }
          element = element.getChild(components[i]);
        }
        return element;
      }
      if (AnalysisEngine.isHtmlFileName(sourceName)) {
        return computeHtmlElement(source);
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.dom.ElementImpl

            }
           
            // DODO This is probably a bad idea (fiddling with Crimson impl classes).
            // Using xerces will solve this problem.
            String c = convertFileName(logFile);
            ElementImpl el = new ElementImpl((CoreDocumentImpl)doc, "param" );
            el.setAttribute("name", "file");
            el.setAttribute("value", c);  
            System.out.println("Adding file atribute value " +  c + " to log4j.xml");
            node.appendChild(el);
        }
    }
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.impl.xs.opti.ElementImpl

     */
    public boolean element2Locator(Element e, SimpleLocator l) {
        if (l == null)
            return false;
        if (e instanceof ElementImpl) {
            ElementImpl ele = (ElementImpl)e;
            // get system id from document object
            Document doc = ele.getOwnerDocument();
            String sid = (String)fDoc2SystemId.get(DOMUtil.getRoot(doc));
            // line/column numbers are stored in the element node
            int line = ele.getLineNumber();
            int column = ele.getColumnNumber();
            l.setValues(sid, sid, line, column, ele.getCharacterOffset());
            return true;
        }
        return false;
    }
View Full Code Here

Examples of com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl

            envelope = (EnvelopeImpl) envelopeChildElement;
        } else if (!(envelopeChildElement instanceof ElementImpl)) {
            log.severe("SAAJ0512.soap.incorrect.factory.used");
            throw new SOAPExceptionImpl("Unable to create envelope: incorrect factory used during tree construction");
        } else {
            ElementImpl soapElement = (ElementImpl) envelopeChildElement;
            if (soapElement.getLocalName().equalsIgnoreCase("Envelope")) {
                String prefix = soapElement.getPrefix();
                String uri = (prefix == null) ? soapElement.getNamespaceURI() : soapElement.getNamespaceURI(prefix);
                if(!uri.equals(NameImpl.SOAP11_NAMESPACE) && !uri.equals(NameImpl.SOAP12_NAMESPACE)) {
                    log.severe("SAAJ0513.soap.unknown.ns");
                    throw new SOAPVersionMismatchException("Unable to create envelope from given source because the namespace was not recognized");
                }
            } else {
View Full Code Here

Examples of com.sun.xml.messaging.saaj.soap.impl.ElementImpl

            envelope = (EnvelopeImpl) envelopeChildElement;
        } else if (!(envelopeChildElement instanceof ElementImpl)) {
            log.severe("SAAJ0512.soap.incorrect.factory.used");
            throw new SOAPExceptionImpl("Unable to create envelope: incorrect factory used during tree construction");
        } else {
            ElementImpl soapElement = (ElementImpl) envelopeChildElement;
            if (soapElement.getLocalName().equalsIgnoreCase("Envelope")) {
                String prefix = soapElement.getPrefix();
                String uri = (prefix == null) ? soapElement.getNamespaceURI() : soapElement.getNamespaceURI(prefix);
                if(!uri.equals(NameImpl.SOAP11_NAMESPACE) && !uri.equals(NameImpl.SOAP12_NAMESPACE)) {
                    log.severe("SAAJ0513.soap.unknown.ns");
                    throw new SOAPVersionMismatchException("Unable to create envelope from given source because the namespace was not recognized");
                }
            } else {
View Full Code Here

Examples of mf.org.apache.xerces.dom.ElementImpl


    public synchronized void startElement( String tagName, AttributeList attrList )
        throws SAXException
    {
        ElementImpl elem;
        int         i;
       
  if ( tagName == null )
      throw new SAXException( "HTM004 Argument 'tagName' is null." );

  // If this is the root element, this is the time to create a new document,
  // because only know we know the document element name and namespace URI.
  if ( _document == null )
  {
      // No need to create the element explicitly.
      _document = new HTMLDocumentImpl();
      elem = (ElementImpl) _document.getDocumentElement();
      _current = elem;
      if ( _current == null )
    throw new SAXException( "HTM005 State error: Document.getDocumentElement returns null." );

      // Insert nodes (comment and PI) that appear before the root element.
      if ( _preRootNodes != null )
      {
    for ( i = _preRootNodes.size() ; i-- > 0 ; )
        _document.insertBefore( (Node) _preRootNodes.elementAt( i ), elem );
    _preRootNodes = null;
      }
      
  }
  else
  {
      // This is a state error, indicates that document has been parsed in full,
      // or that there are two root elements.
      if ( _current == null )
    throw new SAXException( "HTM006 State error: startElement called after end of document element." );
      elem = (ElementImpl) _document.createElement( tagName );
      _current.appendChild( elem );
      _current = elem;
  }

  // Add the attributes (specified and not-specified) to this element.
        if ( attrList != null )
        {
            for ( i = 0 ; i < attrList.getLength() ; ++ i )
                elem.setAttribute( attrList.getName( i ), attrList.getValue( i ) );
        }
    }
View Full Code Here

Examples of mf.org.apache.xerces.impl.xs.opti.ElementImpl

    }
   
    XSAnnotationInfo(String annotation, Element annotationDecl) {
        fAnnotation = annotation;
        if (annotationDecl instanceof ElementImpl) {
            final ElementImpl annotationDeclImpl = (ElementImpl) annotationDecl;
            fLine = annotationDeclImpl.getLineNumber();
            fColumn = annotationDeclImpl.getColumnNumber();
            fCharOffset = annotationDeclImpl.getCharacterOffset();
        }
        else {
            fLine = -1;
            fColumn = -1;
            fCharOffset = -1;
View Full Code Here

Examples of mf.org.apache.xerces.impl.xs.opti.ElementImpl

     */
    public boolean element2Locator(Element e, SimpleLocator l) {
        if (l == null)
            return false;
        if (e instanceof ElementImpl) {
            ElementImpl ele = (ElementImpl)e;
            // get system id from document object
            Document doc = ele.getOwnerDocument();
            String sid = (String)fDoc2SystemId.get(DOMUtil.getRoot(doc));
            // line/column numbers are stored in the element node
            int line = ele.getLineNumber();
            int column = ele.getColumnNumber();
            l.setValues(sid, sid, line, column, ele.getCharacterOffset());
            return true;
        }
        return false;
    }
View Full Code Here

Examples of net.sf.saxon.tree.ElementImpl

            StyleNodeFactory snFactory = config.getStyleNodeFactory();
            includedDoc = pss.loadStylesheetModule(source, snFactory);

            // allow the included document to use "Literal Result Element as Stylesheet" syntax

            ElementImpl outermost = includedDoc.getDocumentElement();

            if (outermost instanceof LiteralResultElement) {
                includedDoc = ((LiteralResultElement)outermost)
                        .makeStylesheet(getPreparedStylesheet(), snFactory);
                outermost = includedDoc.getDocumentElement();
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.