Processing Instructions

An XML document can contain processing instructions that pass commands or information to an application that uses the XML data. The syntax for a processing instruction is:

    <?target instructions?>

where target is the name of the processing application and instructions contains information or commands for processing. Note that both target and instructions are enclosed between question marks (?). In the following code snippet, cocoon-process refers to a processing application and type=”xslt” is the instruction.

    <?cocoon-process type="xslt"?>

The instructions are application-specific. In addition, an XML document can have multiple processing instructions that pass information to different applications.

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!-- This is the first message in the document -->
   <message>
        <priority type="urgent"/>
        <to>you@yourAddress.com</to>
        <from>me@myAddress.com</from>
        <code>
        <![CDATA[<tag> content </tag>]]>
        <code>
        <subject >Car lights on</subject>

        <?cocoon-process type="xslt"?>
        <body type=" text without graphic">
         Owner of vehicle with license plate
         454-561, your lights are on!
        </body>
    </message>

Click the Next button to continue.