Examples of ProcessingInstruction


Examples of client.net.sf.saxon.ce.expr.instruct.ProcessingInstruction

    protected String getErrorCodeForSelectPlusContent() {
        return "XTSE0880";
    }

    public Expression compile(Executable exec, Declaration decl) throws XPathException {
        ProcessingInstruction inst = new ProcessingInstruction(name);
        compileContent(exec, decl, inst, new StringLiteral(StringValue.SINGLE_SPACE));
        return inst;
    }
View Full Code Here

Examples of dk.brics.xact.ProcessingInstruction

        siblings.peek().push(new Text(new String(ch, start, length), getOrigin()));
    }

    @Override
    public void processingInstruction(String target, String data) {
        siblings.peek().push(new ProcessingInstruction(target, data, getOrigin()));
    }
View Full Code Here

Examples of hu.jokeman.xparser.cldc11.document.nodes.ProcessingInstruction

    public void createProcessingInstructionStart (String piName)
            throws DocumentBuilderException {
        XMLNode currentNode = peek ();
        if (currentNode instanceof Document) {
            ProcessingInstruction pi = new ProcessingInstruction (piName);
            currentNode.addChild (pi);
            push (pi);
        } else {
            throw new DocumentBuilderException (
                    "Document schema definitions aren't allowed here.");
View Full Code Here

Examples of hu.jokeman.xparser.impl.document.nodes.ProcessingInstruction

    public void createProcessingInstructionStart (String piName)
            throws DocumentBuilderException {
        XMLNode currentNode = peek ();
        if (currentNode instanceof Document) {
            ProcessingInstruction pi = new ProcessingInstruction (piName);
            currentNode.addChild (pi);
            push (pi);
        } else {
            throw new DocumentBuilderException (
                    "Document schema definitions aren't allowed here.");
View Full Code Here

Examples of javax.xml.stream.events.ProcessingInstruction

  public org.dom4j.ProcessingInstruction readProcessingInstruction(
      XMLEventReader reader) throws XMLStreamException {
    XMLEvent event = reader.peek();

    if (event.isProcessingInstruction()) {
      ProcessingInstruction pi = (ProcessingInstruction) reader
          .nextEvent();

      return createProcessingInstruction(pi);
    } else {
      throw new XMLStreamException("Expected PI event, found: " + event);
View Full Code Here

Examples of mf.javax.xml.stream.events.ProcessingInstruction

                    fSchemaDOMParser.startCDATA(null);
                    sendCharactersToSchemaParser(currentEvent.asCharacters().getData(), false);
                    fSchemaDOMParser.endCDATA(null);
                    break;
                case XMLStreamConstants.PROCESSING_INSTRUCTION:
                    ProcessingInstruction pi = (ProcessingInstruction)currentEvent;
                    fillProcessingInstruction(pi.getData());
                    fSchemaDOMParser.processingInstruction(pi.getTarget(), fTempString, null);
                    break;
                case XMLStreamConstants.DTD:
                    /* There shouldn't be a DTD in the schema */
                    break;
                case XMLStreamConstants.ENTITY_REFERENCE:
View Full Code Here

Examples of mf.org.w3c.dom.ProcessingInstruction

        }
        if (!fDeferNodeExpansion) {
            if (fFilterReject) {
                return;
            }
            ProcessingInstruction pi =
            fDocument.createProcessingInstruction (target, data.toString ());


            setCharacterData (false);
            fCurrentNode.appendChild (pi);
View Full Code Here

Examples of mf.org.w3c.dom.ProcessingInstruction

            }       
        case Node.PROCESSING_INSTRUCTION_NODE: {
           
            //do the well-formed valid PI target name , data check when application has set the value of well-formed feature to true
            if (fDocument.errorChecking && (fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0 ) {
                ProcessingInstruction pinode = (ProcessingInstruction)node ;

                String target = pinode.getTarget();
                //1.check PI target name
                if(fDocument.isXML11Version()){
                    wellformed = XML11Char.isXML11ValidName(target);
                }
                else{               
                    wellformed = XMLChar.isValidName(target);
                }

        if (!wellformed) {
            String msg = DOMMessageFormatter.formatMessage(
                DOMMessageFormatter.DOM_DOMAIN,
                "wf-invalid-character-in-node-name",
                new Object[]{"Element", node.getNodeName()});
                    reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_ERROR, 
                        "wf-invalid-character-in-node-name");
                }       
                               
                //2. check PI data
                //processing isntruction data may have certain characters
                //which may not be valid XML character              
                isXMLCharWF(fErrorHandler, fError, fLocator, pinode.getData(), fDocument.isXML11Version());
            }
           
            if (fValidationHandler != null) {
                // Don't bother filling an XMLString with the data section of the
                // processing instruction. We only send the processing instruction
View Full Code Here

Examples of mf.org.w3c.dom.ProcessingInstruction

        case Node.TEXT_NODE:{
            DOMNormalizer.isXMLCharWF(fErrorHandler, fError, fLocator, node.getNodeValue(), xml11Version);
            break;
        }
        case Node.PROCESSING_INSTRUCTION_NODE:{
            ProcessingInstruction pinode = (ProcessingInstruction)node ;
            String target = pinode.getTarget();
            if (verifyNames) {
                if (xml11Version) {
                    wellformed = XML11Char.isXML11ValidName(target);
                } else {
                    wellformed = XMLChar.isValidName(target);
                }

                if (!wellformed) {
                    String msg =
                        DOMMessageFormatter.formatMessage(
                            DOMMessageFormatter.DOM_DOMAIN,
                            "wf-invalid-character-in-node-name",
                            new Object[] { "Element", node.getNodeName()});
                    DOMNormalizer.reportDOMError(
                        fErrorHandler,
                        fError,
                        fLocator,
                        msg,
                        DOMError.SEVERITY_FATAL_ERROR,
                        "wf-invalid-character-in-node-name");
                }
            }             
            DOMNormalizer.isXMLCharWF(fErrorHandler, fError, fLocator, pinode.getData(), xml11Version);
            break;
        }       
        }
        fLocator.fRelatedNode = null;
    }
View Full Code Here

Examples of net.sf.saxon.instruct.ProcessingInstruction

        select = typeCheck("select", select);
        super.validate();
    }

    public Expression compile(Executable exec) throws TransformerConfigurationException {
        ProcessingInstruction inst = new ProcessingInstruction(name);
        compileContent(exec, inst);
        inst.setSeparator(new StringValue(select==null ? "" : " "));
        ExpressionTool.makeParentReferences(inst);
        return inst;
    }
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.