An example schema for the stringTokenizer activity is shown below:
<?xml version="1.0" encoding="UTF-8"?> <!-- © International Business Machines Corporation, 2002-2006 --> <!-- © The University of Edinburgh, 2002-2006 --> <!-- See OGSA-DAI-Licence.txt for licencing information.--> <xsd:schema targetNamespace="http://ogsadai.org.uk/namespaces/2005/10/types" xmlns:dai="http://ogsadai.org.uk/namespaces/2005/10/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <!-- Import the schema containing the basic OGSA-DAI types. Note: the schemaLocation attribute is currently set to a relative location that assumes this file is placed in the activities schema directory. --> <xsd:include schemaLocation="../../xsd/perform.xsd"/> <!-- Describe the structure of the stringTokenizer element by defining a complex type named StringTokenizerType. --> <xsd:complexType name="StringTokenizerType"> <xsd:complexContent> <xsd:extension base="dai:ActivityType"> <xsd:sequence> <!-- The stream of input data to tokenize. --> <xsd:element name="stringBlocksInput" minOccurs="1" maxOccurs="1" type="daitypes:ActivityInputType"/> <!-- The delimiter(s) to tokenize around. --> <xsd:element name="delimiters" minOccurs="0" maxOccurs="1"> <xsd:complexType> <xsd:attribute name="value" use="required"> <xsd:simpleType> <xsd:restriction base="xsd:string"/> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> <!-- The stream of output tokens that the activity will generate. --> <xsd:element name="stringTokensOutput" minOccurs="1" maxOccurs="1" type="daitypes:ActivityOutputType"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <!-- Define the stringTokenizer activity element and reference the StringTokenizerType described above. --> <xsd:element name="stringTokenizer" type="dai:StringTokenizerType" substitutionGroup="dai:activity"/> </xsd:schema>
Back: How to Write an Activity | ||
© International Business Machines Corporation, 2002-2006 | © The University of Edinburgh, 2002-2006 |