From: <pka...@us...> - 2009-05-02 10:27:35
|
Revision: 200 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=200&view=rev Author: pkasprzak Date: 2009-05-02 10:27:28 +0000 (Sat, 02 May 2009) Log Message: ----------- * Add new courses under "test"-category * If "test"-category does not exist, create one * Demonstrates how to deal with most problems of the ilias' ws interface (no namespaces set, invalid xml, etc.) Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-course.xsd Added Paths: ----------- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle.xml trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle_output.xml trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xml trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xsd trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/setObjectsNS.xsl Modified: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel 2009-04-30 19:18:59 UTC (rev 199) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel 2009-05-02 10:27:28 UTC (rev 200) @@ -3,6 +3,7 @@ name="OutboundClientAdapter" targetNamespace="http://enterprise.netbeans.org/bpel/ILIASClientAdapter/newProcess" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:ns0="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor" @@ -10,12 +11,14 @@ xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" xmlns:sxxf="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions" xmlns:il_crs="http://cse.campussource.de/schema/ilias/course" + xmlns:il_objs="http://cse.campussource.de/schema/ilias/objects" xmlns:tns="http://enterprise.netbeans.org/bpel/ILIASClientAdapter/newProcess"> <import namespace="http://enterprise.netbeans.org/bpel/ilias-3.10.5-Wrapper" location="ilias-3.10.5-Wrapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/ILIASClientAdapter" location="ILIASClientAdapter.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="urn:ilUserAdministration" location="ilias-3.10.5-fixed.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://cse.campussource.de/schema/ilias/course" location="ilias-course.xsd" importType="http://www.w3.org/2001/XMLSchema"/> + <import namespace="http://cse.campussource.de/schema/ilias/objects" location="ilias-objects.xsd" importType="http://www.w3.org/2001/XMLSchema"/> <partnerLinks> <partnerLink name="ILIAS" xmlns:tns="http://enterprise.netbeans.org/bpel/ilias-3.10.5-Wrapper" partnerLinkType="tns:ILIASSoapWebserviceLinkType" partnerRole="ILIASSoapWebserviceRole"/> @@ -23,6 +26,11 @@ </partnerLinks> <variables> + <!-- Messages --> + <variable name="AddObjectOut" xmlns:tns="urn:ilUserAdministration" messageType="tns:addObjectResponse"/> + <variable name="AddObjectIn" xmlns:tns="urn:ilUserAdministration" messageType="tns:addObjectRequest"/> + <variable name="GetObjectsByTitleOut" xmlns:tns="urn:ilUserAdministration" messageType="tns:getObjectsByTitleResponse"/> + <variable name="GetObjectsByTitleIn" xmlns:tns="urn:ilUserAdministration" messageType="tns:getObjectsByTitleRequest"/> <variable name="AddCourseOut" xmlns:tns="urn:ilUserAdministration" messageType="tns:addCourseResponse"/> <variable name="AddCourseIn" xmlns:tns="urn:ilUserAdministration" messageType="tns:addCourseRequest"/> <variable name="LogoutOut" xmlns:tns="urn:ilUserAdministration" messageType="tns:logoutResponse"/> @@ -30,10 +38,19 @@ <variable name="LoginOut" xmlns:tns="urn:ilUserAdministration" messageType="tns:loginResponse"/> <variable name="LoginIn" xmlns:tns="urn:ilUserAdministration" messageType="tns:loginRequest"/> <variable name="ProcessCourseOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/ILIASClientAdapter" messageType="tns:ProcessCourseOperationRequest"/> - <!-- ILIAS session id --> + + <!-- Ilias --> + + <!-- Ilias session id --> <variable name="SID" type="xsd:string"/> - <!-- Course description in ILIAS-Format --> + + <!-- Course description in Ilias-Format --> <variable name="CourseXML" element="il_crs:Course"/> + + <!-- RefId of the category used adding courses to --> + <variable name="CategoryRefId" type="xsd:integer"/> + + </variables> <sequence> @@ -55,7 +72,10 @@ </copy> </assign> - <invoke name="login" partnerLink="ILIAS" operation="login" xmlns:tns="urn:ilUserAdministration" portType="tns:ILIASSoapWebservicePortType" inputVariable="LoginIn" outputVariable="LoginOut"> + <invoke name="login" partnerLink="ILIAS" operation="login" xmlns:tns="urn:ilUserAdministration" + portType="tns:ILIASSoapWebservicePortType" + inputVariable="LoginIn" + outputVariable="LoginOut"> <sxt:trace> <sxt:log level="info" location="onComplete"> <from>concat('*** SID: ', $LoginOut.sid)</from> @@ -70,6 +90,184 @@ </copy> </assign> + <!-- Check if "test" category exists and if not add it --> + <scope name="CheckAndCreateTestCategory"> + + <variables> + <!-- Category description as object in Ilias-Format --> + <variable name="CategoryXML" element="il_objs:Object"/> + + <!-- Result of object search for title --> + <variable name="ObjectsRawXML" element="il_objs:Objects"/> + <variable name="ObjectsXML" element="il_objs:Objects"/> + + </variables> + + <sequence name="CheckForTestCategory"> + <!-- Init variables --> + <assign name="init"> + <copy> + <from>0</from> + <to variable="CategoryRefId"/> + </copy> + </assign> + + <!-- Prepeare search by title --> + <assign name="prepareGetObjectsByTitle"> + <copy> + <from variable="SID"/> + <to>$GetObjectsByTitleIn.sid</to> + </copy> + <copy> + <from>'test'</from> + <to>$GetObjectsByTitleIn.title</to> + </copy> + <copy> + <from>0</from> + <to>$GetObjectsByTitleIn.user_id</to> + </copy> + </assign> + + <!-- Do search --> + <invoke name="getObjectsByTitle" partnerLink="ILIAS" operation="getObjectsByTitle" xmlns:tns="urn:ilUserAdministration" + portType="tns:ILIASSoapWebservicePortType" + inputVariable="GetObjectsByTitleIn" + outputVariable="GetObjectsByTitleOut"> +<!-- + BUG: java.util.logging.ErrorManager: 5: Error in extracting Name Value Pairs + java.lang.NullPointerException + <sxt:trace> + <sxt:log level="info" location="onComplete"> + <from>concat('*** ObjectsXML: ', $GetObjectsByTitleOut.object_xml)</from> + </sxt:log> + </sxt:trace> +--> + </invoke> + + <!-- Don't try to unmarshal empty string (i.e. no objects found) --> + <if> + <condition>$GetObjectsByTitleOut.object_xml != ""</condition> + <sequence name="processObjectsXML"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>'*** Processing ObjectsXML...'</from> + </sxt:log> + </sxt:trace> + + <!-- Convert to XML structure --> + <assign name="unmarshalResult" > + <copy> + <from>sxxf:doUnMarshal($GetObjectsByTitleOut.object_xml)</from> + <to variable="ObjectsRawXML"/> + </copy> + </assign> + + <assign> +<!-- + BUG: java.util.logging.ErrorManager: 5: Error in extracting Name Value Pairs + java.lang.NullPointerException + <sxt:trace> + <sxt:log level="info" location="onComplete"> + <from>concat('*** ObjectsXML (after xslt): ', sxxf:doMarshal($ObjectsXML))</from> + </sxt:log> + </sxt:trace> +--> + <copy> + <from>ns0:doXslTransform('urn:stylesheets:setObjectsNS.xsl', $ObjectsRawXML)</from> + <to variable="ObjectsXML"/> + </copy> + </assign> + + <!-- Determine, if there is a category in the result (Object/@type = "cat") and get it's refId for later --> + <assign name="checkForCategories"> + +<!-- + BUG: java.util.logging.ErrorManager: 5: Error in extracting Name Value Pairs + java.lang.NullPointerException + + <sxt:trace> + <sxt:log level="info" location="onComplete"> + <from>concat('*** CategoryRefId: ', string($CategoryRefId))</from> + </sxt:log> + </sxt:trace> +--> + <!-- Note: if an empty node is return below, it is converted by number() to "NaN" --> + <copy> + <from>number($ObjectsXML/il_objs:Object[@il_objs:type = 'cat']/il_objs:References/@il_objs:ref_id)</from> + <to variable="CategoryRefId"/> + </copy> + </assign> + </sequence> + </if> + + <!-- If no appropriate catgeory was found, create one --> + <if> + <condition>string($CategoryRefId) = 'NaN' or $CategoryRefId = 0</condition> + <sequence name="addTestCategory"> + <assign name="prepareAddCategory"> + <copy> + <from variable="SID"/> + <to>$AddObjectIn.sid</to> + </copy> + <copy> + <from>1</from> + <to>$AddObjectIn.target_id</to> + </copy> + <copy> + <from> + <literal> + <Object xmlns="http://cse.campussource.de/schema/ilias/objects" type="cat"> + <Title>test</Title> + <Description>test category</Description> + </Object> + </literal> + </from> + <to variable="CategoryXML"/> + </copy> + </assign> + + <!-- Render XML to string --> + <assign name="marshalCategoryXML"> + <copy> + <from>sxxf:doMarshal($CategoryXML)</from> + <to>$AddObjectIn.object_xml</to> + </copy> + </assign> + + <invoke name="addCategory" partnerLink="ILIAS" operation="addObject" xmlns:tns="urn:ilUserAdministration" + portType="tns:ILIASSoapWebservicePortType" + inputVariable="AddObjectIn" + outputVariable="AddObjectOut"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Adding Category: ', $AddObjectIn.object_xml)</from> + </sxt:log> + </sxt:trace> + </invoke> + + <!-- Set RefId --> + <assign name="setRefId"> + <copy> + <from>$AddObjectOut.ref_id</from> + <to variable="CategoryRefId"/> + </copy> + </assign> + </sequence> + </if> + </sequence> + </scope> +<!-- + <forEach name="SearchForCategoryInResult" parallel="no" counterName="ObjectCounter"> + <startCounterValue>1</startCounterValue> + <finalCounterValue>$ObjectsXML/object[.]</finalCounterValue> + <completionCondition> + <branches>6</branches> + </completionCondition> + <scope name="Scope1"> + <assign name="Assign1"/> + </scope> + </forEach> +--> <!-- Initialize course xml skeleton --> <assign name="initializeCourseXML"> <copy> @@ -91,14 +289,13 @@ </assign> <!-- Set relevant course data --> - <assign name="setCourseData"> <copy> <!-- <from>$ProcessCourseOperationIn.courseMessage/course/attribute[name = 'title']/value</from> --> - <from>'test5'</from> - <to>$CourseXML/il_crs:MetaData/il_crs:General/il_crs:Title</to> + <from>'test6'</from> + <to>$CourseXML/il_crs:MetaData/il_crs:General/il_crs:Title/text()</to> </copy> <!-- <copy> @@ -121,7 +318,7 @@ </copy> <!-- Set targetRefId with defaut value (= catgeory-root hopefully...) --> <copy> - <from>1</from> + <from variable="CategoryRefId"/> <to variable="AddCourseIn" part="target_id"/> </copy> <!-- Set CourseXML (as string) --> @@ -131,8 +328,15 @@ </copy> </assign> - <invoke name="createLecture" partnerLink="ILIAS" operation="addCourse" xmlns:tns="urn:ilUserAdministration" portType="tns:ILIASSoapWebservicePortType" inputVariable="AddCourseIn" outputVariable="AddCourseOut"> + <invoke name="createLecture" partnerLink="ILIAS" operation="addCourse" xmlns:tns="urn:ilUserAdministration" + portType="tns:ILIASSoapWebservicePortType" + inputVariable="AddCourseIn" + outputVariable="AddCourseOut"> <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Adding Course (refId: ', $AddCourseIn.target_id, ', xml: ', $AddCourseIn.crs_xml, ')')</from> + </sxt:log> + <sxt:log level="info" location="onComplete"> <from>concat('*** Result of addCourse: ', $AddCourseOut.course_id)</from> </sxt:log> @@ -145,7 +349,10 @@ <to variable="LogoutIn" part="sid"/> </copy> </assign> - <invoke name="logout" partnerLink="ILIAS" operation="logout" xmlns:tns="urn:ilUserAdministration" portType="tns:ILIASSoapWebservicePortType" inputVariable="LogoutIn" outputVariable="LogoutOut"> + <invoke name="logout" partnerLink="ILIAS" operation="logout" xmlns:tns="urn:ilUserAdministration" + portType="tns:ILIASSoapWebservicePortType" + inputVariable="LogoutIn" + outputVariable="LogoutOut"> <sxt:trace> <sxt:log level="info" location="onComplete"> <from>concat('*** Result of logout: ', $LogoutOut.success)</from> Modified: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-course.xsd =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-course.xsd 2009-04-30 19:18:59 UTC (rev 199) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-course.xsd 2009-05-02 10:27:28 UTC (rev 200) @@ -2,8 +2,11 @@ <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://cse.campussource.de/schema/ilias/course" - targetNamespace="http://cse.campussource.de/schema/ilias/course"> + targetNamespace="http://cse.campussource.de/schema/ilias/course" + elementFormDefault="qualified" + attributeFormDefault="qualified"> + <xs:element name="Admin"> <xs:complexType> <xs:sequence/> Added: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle.xml =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle.xml (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle.xml 2009-05-02 10:27:28 UTC (rev 200) @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8"?><!DOCTYPE Objects PUBLIC "-//ILIAS//DTD ILIAS Repositoryobjects//EN" "http://localhost/ilias3/xml/ilias_object_3_10.dtd"> +<!--Export of ILIAS objects--> +<Objects> + <Object type="crs" obj_id="175"> + <Title>test course 1</Title> + <Description>test course description</Description> + <Owner>6</Owner> + <CreateDate>2009-04-30 11:42:16</CreateDate> + <LastUpdate>2009-04-30 11:42:47</LastUpdate> + <ImportId></ImportId> + <References ref_id="41" parent_id="40" accessInfo="granted"> + <Path> + <Element ref_id="1" type="root">Repository</Element> + <Element ref_id="40" type="cat">test</Element> + </Path> + </References> + </Object> + <Object type="cat" obj_id="174"> + <Title>test</Title> + <Description>test category</Description> + <Owner>6</Owner> + <CreateDate>2009-04-30 11:41:37</CreateDate> + <LastUpdate>2009-04-30 11:41:37</LastUpdate> + <ImportId></ImportId> + <References ref_id="40" parent_id="1" accessInfo="granted"> + <Path> + <Element ref_id="1" type="root">Repository</Element> + </Path> + </References> + </Object> + <Object type="crs" obj_id="168"> + <Title>test2</Title> + <Description>bpel test2</Description> + <Owner>6</Owner> + <CreateDate>2009-04-28 00:31:35</CreateDate> + <LastUpdate>2009-04-28 00:31:35</LastUpdate> + <ImportId></ImportId> + <References ref_id="38" parent_id="1" accessInfo="granted"> + <Path> + <Element ref_id="1" type="root">Repository</Element> + </Path> + </References> + </Object> + <Object type="crs" obj_id="163"> + <Title>test</Title> + <Description></Description> + <Owner>6</Owner> + <CreateDate>2009-04-28 00:12:12</CreateDate> + <LastUpdate>2009-04-28 00:12:12</LastUpdate> + <ImportId></ImportId> + <References ref_id="36" parent_id="1" accessInfo="granted"> + <Path> + <Element ref_id="1" type="root">Repository</Element> + </Path> + </References> + </Object> +</Objects> \ No newline at end of file Added: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle_output.xml =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle_output.xml (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-getObjectsByTitle_output.xml 2009-05-02 10:27:28 UTC (rev 200) @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--Export of ILIAS objects--> +<ns383:Objects xmlns:ns383="http://cse.campussource.de/schema/ilias/objects"> + <ns384:Object xmlns:ns384="http://cse.campussource.de/schema/ilias/objects" xmlns:il_objects="http://cse.campussource.de/schema/ilias/objects" il_objects:type="crs" il_objects:obj_id="175"> + <ns385:Title xmlns:ns385="http://cse.campussource.de/schema/ilias/objects">test course 1</ns385:Title> + <ns386:Description xmlns:ns386="http://cse.campussource.de/schema/ilias/objects">test course description</ns386:Description> + <ns387:Owner xmlns:ns387="http://cse.campussource.de/schema/ilias/objects">6</ns387:Owner> + <ns388:CreateDate xmlns:ns388="http://cse.campussource.de/schema/ilias/objects">2009-04-30 11:42:16</ns388:CreateDate> + <ns389:LastUpdate xmlns:ns389="http://cse.campussource.de/schema/ilias/objects">2009-04-30 11:42:47</ns389:LastUpdate> + <ns390:ImportId xmlns:ns390="http://cse.campussource.de/schema/ilias/objects"/> + <ns391:References xmlns:ns391="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="41" il_objects:parent_id="40" il_objects:accessInfo="granted"> + <ns392:Path xmlns:ns392="http://cse.campussource.de/schema/ilias/objects"> + <ns393:Element xmlns:ns393="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="1" il_objects:type="root">Repository</ns393:Element> + <ns394:Element xmlns:ns394="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="40" il_objects:type="cat">test</ns394:Element> + </ns392:Path> + </ns391:References> + </ns384:Object> + <ns395:Object xmlns:ns395="http://cse.campussource.de/schema/ilias/objects" xmlns:il_objects="http://cse.campussource.de/schema/ilias/objects" il_objects:type="cat" il_objects:obj_id="174"> + <ns396:Title xmlns:ns396="http://cse.campussource.de/schema/ilias/objects">test</ns396:Title> + <ns397:Description xmlns:ns397="http://cse.campussource.de/schema/ilias/objects">test category</ns397:Description> + <ns398:Owner xmlns:ns398="http://cse.campussource.de/schema/ilias/objects">6</ns398:Owner> + <ns399:CreateDate xmlns:ns399="http://cse.campussource.de/schema/ilias/objects">2009-04-30 11:41:37</ns399:CreateDate> + <ns400:LastUpdate xmlns:ns400="http://cse.campussource.de/schema/ilias/objects">2009-04-30 11:41:37</ns400:LastUpdate> + <ns401:ImportId xmlns:ns401="http://cse.campussource.de/schema/ilias/objects"/> + <ns402:References xmlns:ns402="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="40" il_objects:parent_id="1" il_objects:accessInfo="granted"> + <ns403:Path xmlns:ns403="http://cse.campussource.de/schema/ilias/objects"> + <ns404:Element xmlns:ns404="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="1" il_objects:type="root">Repository</ns404:Element> + </ns403:Path> + </ns402:References> + </ns395:Object> + <ns405:Object xmlns:ns405="http://cse.campussource.de/schema/ilias/objects" xmlns:il_objects="http://cse.campussource.de/schema/ilias/objects" il_objects:type="crs" il_objects:obj_id="168"> + <ns406:Title xmlns:ns406="http://cse.campussource.de/schema/ilias/objects">test2</ns406:Title> + <ns407:Description xmlns:ns407="http://cse.campussource.de/schema/ilias/objects">bpel test2</ns407:Description> + <ns408:Owner xmlns:ns408="http://cse.campussource.de/schema/ilias/objects">6</ns408:Owner> + <ns409:CreateDate xmlns:ns409="http://cse.campussource.de/schema/ilias/objects">2009-04-28 00:31:35</ns409:CreateDate> + <ns410:LastUpdate xmlns:ns410="http://cse.campussource.de/schema/ilias/objects">2009-04-28 00:31:35</ns410:LastUpdate> + <ns411:ImportId xmlns:ns411="http://cse.campussource.de/schema/ilias/objects"/> + <ns412:References xmlns:ns412="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="38" il_objects:parent_id="1" il_objects:accessInfo="granted"> + <ns413:Path xmlns:ns413="http://cse.campussource.de/schema/ilias/objects"> + <ns414:Element xmlns:ns414="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="1" il_objects:type="root">Repository</ns414:Element> + </ns413:Path> + </ns412:References> + </ns405:Object> + <ns415:Object xmlns:ns415="http://cse.campussource.de/schema/ilias/objects" xmlns:il_objects="http://cse.campussource.de/schema/ilias/objects" il_objects:type="crs" il_objects:obj_id="163"> + <ns416:Title xmlns:ns416="http://cse.campussource.de/schema/ilias/objects">test</ns416:Title> + <ns417:Description xmlns:ns417="http://cse.campussource.de/schema/ilias/objects"/> + <ns418:Owner xmlns:ns418="http://cse.campussource.de/schema/ilias/objects">6</ns418:Owner> + <ns419:CreateDate xmlns:ns419="http://cse.campussource.de/schema/ilias/objects">2009-04-28 00:12:12</ns419:CreateDate> + <ns420:LastUpdate xmlns:ns420="http://cse.campussource.de/schema/ilias/objects">2009-04-28 00:12:12</ns420:LastUpdate> + <ns421:ImportId xmlns:ns421="http://cse.campussource.de/schema/ilias/objects"/> + <ns422:References xmlns:ns422="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="36" il_objects:parent_id="1" il_objects:accessInfo="granted"> + <ns423:Path xmlns:ns423="http://cse.campussource.de/schema/ilias/objects"> + <ns424:Element xmlns:ns424="http://cse.campussource.de/schema/ilias/objects" il_objects:ref_id="1" il_objects:type="root">Repository</ns424:Element> + </ns423:Path> + </ns422:References> + </ns415:Object> +</ns383:Objects> Added: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xml =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xml (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xml 2009-05-02 10:27:28 UTC (rev 200) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Document : ilias-objects.xml + Created on : May 2, 2009, 12:23 AM + Author : pete + Description: + Purpose of the document follows. +--> + +<ns0:Element xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' + xmlns:ns0='http://cse.campussource.de/schema/ilias/objects' + xsi:schemaLocation='http://cse.campussource.de/schema/ilias/objects ilias-objects.xsd' ns0:ref_id="" ns0:type=""> + +</ns0:Element> Added: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xsd =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xsd (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/ilias-objects.xsd 2009-05-02 10:27:28 UTC (rev 200) @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<xs:schema version="1.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns="http://cse.campussource.de/schema/ilias/objects" + targetNamespace="http://cse.campussource.de/schema/ilias/objects" + elementFormDefault="qualified" + attributeFormDefault="qualified"> + + <xs:element name="Element"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="ref_id" type="xs:string" use="required"/> + <xs:attribute name="type" type="xs:string" use="required"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + + <xs:element name="Object"> + <xs:complexType> + <xs:sequence> + <xs:element name="Title" type="xs:string"/> + <xs:element name="Description" type="xs:string" minOccurs="0"/> + <xs:element name="Owner" type="xs:string"/> + <xs:element name="CreateDate" type="xs:string" minOccurs="0"/> + <xs:element name="LastUpdate" type="xs:string" minOccurs="0"/> + <xs:element name="ImportId" type="xs:string" minOccurs="0"/> + <xs:element ref="References" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="type" type="xs:string" use="required"/> + <xs:attribute name="obj_id" type="xs:string"/> + </xs:complexType> + </xs:element> + + <xs:element name="Objects"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Object" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="Operation"> + <xs:simpleType> + <xs:restriction base="xs:string"/> + </xs:simpleType> + </xs:element> + + <xs:element name="Path"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Element" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="References"> + <xs:complexType> + <xs:sequence> + <xs:element ref="TimeTarget" minOccurs="0"/> + <xs:element ref="Operation" minOccurs="0" maxOccurs="unbounded"/> + <xs:element ref="Path" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="ref_id" type="xs:string" use="required"/> + <xs:attribute name="parent_id" type="xs:string"/> + <xs:attribute name="accessInfo" type="xs:string"/> + </xs:complexType> + </xs:element> + + <xs:element name="Suggestion"> + <xs:complexType> + <xs:sequence/> + <xs:attribute name="starting_time" type="xs:string" use="required"/> + <xs:attribute name="ending_time" type="xs:string" use="required"/> + <xs:attribute name="changeable" type="xs:string" use="required"/> + <xs:attribute name="earliest_start" type="xs:string"/> + <xs:attribute name="latest_end" type="xs:string"/> + </xs:complexType> + </xs:element> + + <xs:element name="TimeTarget"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Timing" minOccurs="0"/> + <xs:element ref="Suggestion" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="type" type="xs:string" use="required"/> + </xs:complexType> + </xs:element> + + <xs:element name="Timing"> + <xs:complexType> + <xs:sequence/> + <xs:attribute name="starting_time" type="xs:string" use="required"/> + <xs:attribute name="ending_time" type="xs:string" use="required"/> + <xs:attribute name="visibility" type="xs:string" use="required"/> + </xs:complexType> + </xs:element> +</xs:schema> + Added: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/setObjectsNS.xsl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/setObjectsNS.xsl (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/setObjectsNS.xsl 2009-05-02 10:27:28 UTC (rev 200) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Document : setObjectsNS.xsl.xsl + Created on : May 1, 2009, 10:58 PM + Author : pete + Description: + Purpose of transformation follows. +--> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:il_objects="http://cse.campussource.de/schema/ilias/objects" + xmlns="http://cse.campussource.de/schema/ilias/objects" + version="1.0"> + + <xsl:output method="xml" + media-type="text/xml" + indent="yes" + encoding="UTF-8" + omit-xml-declaration="no"/> + + <xsl:template match="*"> + <xsl:element name="{local-name()}" namespace="http://cse.campussource.de/schema/ilias/objects"> +<!-- + <xsl:copy-of select="node()"/> +--> + + <xsl:apply-templates select="@*|node()"/> + + </xsl:element> + </xsl:template> + + <xsl:template match="@*"> + <xsl:attribute name="{local-name()}" namespace="http://cse.campussource.de/schema/ilias/objects"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:template> + + <xsl:template match="processing-instruction()|comment()"> + <xsl:copy> + <xsl:apply-templates select="node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |