From: <ale...@us...> - 2009-05-29 13:22:50
|
Revision: 227 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=227&view=rev Author: alexloewen Date: 2009-05-29 13:22:48 +0000 (Fri, 29 May 2009) Log Message: ----------- added deleteObjectNS.xsl , it makes object_xml acceptable by ILIAS. Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/UpdateCategory.bpel Added Paths: ----------- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/deleteObjectsNS.xsl Modified: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/UpdateCategory.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/UpdateCategory.bpel 2009-05-29 12:43:01 UTC (rev 226) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/UpdateCategory.bpel 2009-05-29 13:22:48 UTC (rev 227) @@ -39,7 +39,7 @@ <to variable="GetObjectsByTitleIn" part="sid"/> </copy> <copy> - <from>'test7'</from> + <from>'test10'</from> <to variable="GetObjectsByTitleIn" part="title"/> </copy> <copy> @@ -59,6 +59,11 @@ </assign> <assign name="doXSLTransformation"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <ns0:from>concat('*** before xslt: ', $GetObjectsByTitleOut.object_xml)</ns0:from> + </sxt:log> + </sxt:trace> <copy> <from>ns0:doXslTransform('urn:stylesheets:setObjectsNS.xsl', $CategoryXML)</from> <to variable="CategoryXMLtransformed"/> @@ -67,11 +72,11 @@ </assign> <assign name="fakeUpdateData"> <copy> - <from>'test10'</from> + <from>'test12'</from> <to>$CategoryXMLtransformed/il_objs:Object/il_objs:Title</to> </copy> <copy> - <from>'descrTest'</from> + <from>'descrTest2'</from> <to>$CategoryXMLtransformed/il_objs:Object/il_objs:Description</to> </copy> <copy> @@ -79,16 +84,22 @@ <to>$CategoryXMLtransformed/il_objs:Object/il_objs:LastUpdate</to> </copy> </assign> + <assign name="deleteNamespaces"> + <copy> + <from>ns0:doXslTransform('urn:stylesheets:deleteObjectsNS.xsl', $CategoryXMLtransformed)</from> + <to variable="CategoryXML"/> + </copy> + </assign> <assign name="marshallCategoryXML"> <copy> - <from>sxxf:doMarshal($CategoryXMLtransformed)</from> + <from>sxxf:doMarshal($CategoryXML)</from> <to variable="UpdateObjectsIn" part="object_xml"/> </copy> </assign> <assign name="prepareForUpdateObject"> <sxt:trace> <sxt:log level="info" location="onStart"> - <ns0:from>concat('*** Objects-XML: ', $UpdateObjectsIn.object_xml)</ns0:from> + <ns0:from>concat('*** InputForUpdate: ', $UpdateObjectsIn.object_xml)</ns0:from> </sxt:log> </sxt:trace> <copy> Added: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/deleteObjectsNS.xsl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/deleteObjectsNS.xsl (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/deleteObjectsNS.xsl 2009-05-29 13:22:48 UTC (rev 227) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Document : deleteObjectsNS.xsl.xsl + Created on : May 29, 2009, 15:00 PM + Author : alex + Description: + delete Namespaces, because ilias doesnt like it +--> + +<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=""> +<!-- + <xsl:copy-of select="node()"/> +--> + + <xsl:apply-templates select="@*|node()"/> + + </xsl:element> + </xsl:template> + + <xsl:template match="@*"> + <xsl:attribute name="{local-name()}" namespace=""> + <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. |