IPP>PRO A simple XML example for today's teleconference

IPP>PRO A simple XML example for today's teleconference

Robert Herriot Robert.Herriot at Eng.Sun.COM
Wed Jan 14 15:45:20 EST 1998


Here is a simple example for us to use in today's teleconference.
It encodes a PrintJob operations into XML.  There are many ways to
do this.  This is one idea that is roughly correct but not
exactly what I might propose a few days from now.


Note: '<!--' and  '-->' mark the beginning and end of comments and
the '<' and '>' mark the beginning and end of 'elements' which
provide the structuring.  I will make liberal use of comments below
each line to explain what is meant above.


NOTE: THIS EXAMPLE IS TO PRESENT IDEAS FOR DISCUSSION. DO NOT TAKE
THIS AS A PROPOSAL.




   POST /printer/killtree HTTP/1.1
   Content-Type = text/xml
   Content-Length = ???


   <?XML version="1.0" encoding='UTF-8'>
   <!--  XML version   charset for operation -->
   <?namespace href = "http://www.pwg.org/pub/pwg/ipp/" As = "P"?>
   <?namespace href = "http://printing.eng.sun.com/jobSheets/" As = "S"?>
   <!--  defines 'P' and 'S' as abbreviation for URLs so that -->
   <!--  element names can be unique within name spaces -->
   <!--  an element name of the form P:foo means that foo is defined -->
   <!-- by the pwg url  -->


   <P:operation version = "1.1" name = "printJob" xml:lang="en">
   <!--         ipp version        operation name  language  --> 
      <P:operation-attributes>
      <!-- operation attributes -->
          <P:job-name xml:lang="de">mein Stoff</P:job-name>
          <!--  note job-name's language is overridden easily -->
          <P:requesting-user-name>Wolfgang</P:requesting-user-name>
      </P:operation-attributes>
      <!--  end of operation attributes -->


      <P:job-attributes>
          <P:job-priority>50</P:job-priority>
          <P:sides ><P:side-type value=two-sided-long-edge/></P:sides>
          <!--  the value is a key-word. Keywords can be done several ways -->
          <P:job-sheets><P: job-sheet-type S:custom-job-sheet\></P:job-sheets>
          <!--  the value is a key-word local to Sun -->


          <P:resolution>
          <!-- below is a sample structured value -->
              <P:cross-feed>300</P:cross-feed>
              <P:feed>300</P:feed>
              <P:units>inch</P:units>
          </P:resolution>


      </P:job-attributes>
   </P:operation>
   <!--  document data is a problem -->



More information about the Ipp mailing list