You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by da...@apache.org on 2004/10/16 02:10:43 UTC

cvs commit: xml-xmlbeans/samples/substitutiongroup/SubstitutionGroup README.txt

daveremy    2004/10/15 17:10:43

  Added:       samples/substitutiongroup/SubstitutionGroup README.txt
  Log:
  Adding the SubstitutionGroup readme file.
  
  Revision  Changes    Path
  1.1                  xml-xmlbeans/samples/substitutiongroup/SubstitutionGroup/README.txt
  
  Index: README.txt
  ===================================================================
  Sample: SubstitutionGroup
  Author: Rashmi Banthia (rjain29@gmail.com)
  Last Updated: Oct. 6th, 2004
  
  Versions:
      xmlbeans-1.0.3
  
  
  -----------------------------------------------------------------------------
  
  This sample illustrates substitution group elements in an XML document.
  
  When you run this sample, you'll see it print substitution group element names and values.
  Also it creates a new XML document to demonstrate how to write substitution group elements.
  
  
  For example, for the following schema and XML fragment:
  
  <xs:element name="comment" type="xs:string" />
  <xs:element name="ship-comment" type="xs:string" substitutionGroup="po:comment" />
  <xs:element name="bill-comment" type="xs:string" substitutionGroup="po:comment" />
  
  <fragment>
      <ship-comment>Sample ship comment</ship-comment>
  </fragment>
  <fragment>
      <comment>Sample comment</comment>
  </fragment>
  
  
  It will print:
  --------------
  ship-comment
  Sample ship comment
  
  comment
  Sample comment
  
  
  Also it will write the following fragment to a XML document:
  <fragment>
      <bill-comment>Sample bill comment</bill-comment>
  </fragment>
  
  
  
  To try out this sample:
  
  1. Set XMLBEANS_HOME in your environment
  2. Ant must be on your PATH
  3. To compile the schemas and sample source, run "ant build"
  4. To execute the sample, run "ant run"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org