COSMOS User's Guide


How to export resources

The following export procedure assumes you already have an SML document. If you do not have an SML document, use the export wizard to create an SML-IF document.

  1. To start the Export wizard, perform these steps:
    1. Select the folders or model units that are to be included in the interchange document.
    2. Right-click on the items and select Export. The Export Select window is displayed.
  2. From the Export Select window, perform these steps:
    1. Expand the Service Modeling Language category.
    2. Click Interchange Format.
    3. Click Next. The Export Interchange Format window is displayed.
  3. From the Export Interchange Format window perform these steps.
    1. Select the resources to export
    2. Click Next. The Export Interchange Format window is displayed.
  4. From the Export Interchange Format window, perform these steps. Specify aliases, if desired, for document and SML-IF identity information.
    1. (Optional) Add an alias to a Detected Document. Click the Detected Document, click Add, enter the new aliases name in the pop-up window, and click OK..
    2. Add identity information. Enter the name, display name, description, and base URI .
    3. Click Next.
  5. (Optional) Add rule bindings to bind a named Schematron rule to an SML instance.
    1. Click Add.
    2. Click the Alias drop-down arrow to select the alias to be bound for the selected document.
    3. Click the Rule drop-down arrow to bind the document to an existing Schematron rule.
    4. Click Finish.

After the SML-IF document is created, open the document in the SML-IF editor to display the document source.

This is an example that shows the contents of an exported SML-IF document.

<?xml version="1.0" encoding="UTF-8"?>
 - <smlif:model xmlns:smlif="http://www.w3.org/2008/03/sml-if"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.w3.org/2008/03/sml-if smlif.xsd">
	-<smlif:identity xml:base="http://interop.serviceml.org">
	  <smlif:name>School1</smlif:name>
    <smlif:version>1.0</smlif:version>
    <smlif:displayName locid="school1.com/langName">school1</smlif:displayName>
    <smlif:baseURI>school1.com</smlif:baseURI>
    <smlif:description locid="school1.com/langDescription">This information is for 
      school1</smlif:description>		
	 </smlif:identity>
 - <smlif:instances>
		<smlif:document>
			<smlif:docinfo>
				<smlif:aliases>
					<smlif:alias>cosmos/resource_modeling/src/test-resources/deref/Students-
             MultipleNonRoot.xml</smlif:alias>
				</smlif:aliases>
			</smlif:docinfo>
    - <smlif:data>
       <Students xmls="urn:university">
         <ID>1000</ID>
         <Name>John</Name>
       </Student>
    - <Student xmlns="urn:university" SSN="333-22-4444">
         <ID>1001</ID>
         <Name>John</Name>
       </Student>


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]