Package org.apache.xalan.xsltc.dom

Examples of org.apache.xalan.xsltc.dom.SAXImpl


     * The index contains the element node index (int) and Id value (String).
     */
    private final void buildIDIndex(DOM document) {
       
        if (document instanceof SAXImpl) {
            SAXImpl saxImpl = (SAXImpl)document;
           
            // If the input source is DOMSource, the KeyIndex table is not
            // built at this time. It will be built later by the lookupId()
            // and containsId() methods of the KeyIndex class.
            if (saxImpl.hasDOMSource()) {
                buildKeyIndex(ID_INDEX_NAME, document);
                return;
            }
            else {
                final Hashtable elementsByID = saxImpl.getElementsWithIDs();

                if (elementsByID == null) {
                  return;
                }

View Full Code Here


      final XMLReader reader = parser.getXMLReader();

      // Set the DOM's DOM builder as the XMLReader's SAX2 content handler
            XSLTCDTMManager dtmManager = XSLTCDTMManager.newInstance();

            final SAXImpl dom = (SAXImpl)dtmManager.getDTM(
                             new SAXSource(reader, new InputSource(_fileName)),
                             false, null, true, false, translet.hasIdCall());

      dom.setDocumentURI(_fileName);
            translet.prepassDocument(dom);

      // Pass global parameters
      int n = _params.size();
      for (int i = 0; i < n; i++) {
View Full Code Here

     * Internal interface which returns a DOM for a given DTMManager and translet.
     */
    protected DOM getDOM(XSLTCDTMManager dtmManager, AbstractTranslet translet)
        throws SAXException
    {
        SAXImpl idom = (SAXImpl)_dom.get();
               
        if (idom != null) {
            if (dtmManager != null) {
                idom.migrateTo(dtmManager);
            }
        }
        else {
            Source source = _source;
            if (source == null) {
                if (_systemId != null && _systemId.length() > 0) {
                    source = new StreamSource(_systemId);
                }
                else {
                    ErrorMsg err = new ErrorMsg(ErrorMsg.XSLTC_SOURCE_ERR);
                    throw new SAXException(err.toString());
                }
            }
           
            DOMWSFilter wsfilter = null;
            if (translet != null && translet instanceof StripFilter) {
                wsfilter = new DOMWSFilter(translet);
            }
               
            boolean hasIdCall = (translet != null) ? translet.hasIdCall() : false;
           
            if (dtmManager == null) {
                dtmManager = XSLTCDTMManager.newInstance();
            }
           
            idom = (SAXImpl)dtmManager.getDTM(source, true, wsfilter, false, false, hasIdCall);
           
            String systemId = getSystemId();
            if (systemId != null) {
                idom.setDocumentURI(systemId);
            }
            _dom.set(idom);
        }
        return idom;
    }
View Full Code Here

TOP

Related Classes of org.apache.xalan.xsltc.dom.SAXImpl

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.