From: pkiddie <pk...@us...> - 2005-08-03 13:55:34
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28028/scripts Modified Files: Tag: development_xmlrqp stackQuestion.php stackXML.php Log Message: Refinements to schema creation: addition of methods to simplify schema creation. Updates to stackQuestion. Some example schemas Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.13.2.4 retrieving revision 1.13.2.5 diff -C2 -d -r1.13.2.4 -r1.13.2.5 *** stackXML.php 2 Aug 2005 16:00:27 -0000 1.13.2.4 --- stackXML.php 3 Aug 2005 13:55:24 -0000 1.13.2.5 *************** *** 1399,1407 **** include($filename); ! $dublinCoreUri = 'http://purl.org/dc/elements/1.1/'; ! $learningObjectUri = 'http://www.imsglobal.org/xsd/imsmd_v1p2'; //Namespace does not seem to resolve to anything ! $dublinCoreLocation = 'dc.xsd'; ! $learningObjectLocation = 'imsmd_v1p2.xsd'; $types = array(); //Array of metadata types - dublincore, stack, lom etc. --- 1399,1418 ---- [...1050 lines suppressed...] + + $schemaMinOccursAttr = &new DOMIT_Attr('minOccurs'); + //Assume a default minimum occurrence of 0 for the field - doesnt have to crop up + $schemaMinOccursAttr->nodeValue=$minOccurs; + + $schemaMaxOccursAttr = &new DOMIT_Attr('maxOccurs'); + //Assume a default maximum occurrence of 1 - must only occur exactly once + $schemaMaxOccursAttr->nodeValue=$maxOccurs; + + //Add attributes to element + $schemaField->setAttributeNode($schemaFieldAttr); + $schemaField->setAttributeNode($schemaMinOccursAttr); + $schemaField->setAttributeNode($schemaMaxOccursAttr); + + return $schemaField; + } + + function stack_xml_create_schema_keyval_type() { Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.30.2.3 retrieving revision 1.30.2.4 diff -C2 -d -r1.30.2.3 -r1.30.2.4 *** stackQuestion.php 2 Aug 2005 16:00:26 -0000 1.30.2.3 --- stackQuestion.php 3 Aug 2005 13:55:24 -0000 1.30.2.4 *************** *** 263,266 **** --- 263,268 ---- $sqlToSchemaMapping['TIMESTAMP']='time'; + $sqlToSchemaMapping['FLOAT']='float'; + *************** *** 861,867 **** // 'Mark modifier operation'; ! $stackQuestionPotResp['RawMarkMod']['type']='option'; $stackQuestionPotResp['RawMarkMod']['branch']=TRUE; // 'Mark modifier'; --- 863,870 ---- // 'Mark modifier operation'; ! //<PDK> edited for schema output $stackQuestionPotResp['RawMarkMod']['type']='option'; $stackQuestionPotResp['RawMarkMod']['branch']=TRUE; + $stackQuestionPotResp['RawMarkMod']['values']= array ('=','+','-','=AT'); // 'Mark modifier'; *************** *** 1080,1084 **** $stackOptions['AnsTest']['values'] = $ats; ! /** --- 1083,1088 ---- $stackOptions['AnsTest']['values'] = $ats; ! //<PDK> added here ! $stackQuestionPotResp['AnsTest']['values'] = $ats; /** |