# HG changeset patch # User paulb # Date 1121815724 0 # Node ID 6a57c148df2ded62280d18447cabe5594835224f # Parent bca5ee80a9febc66c0329e99d9168436b4b5ad0c [project @ 2005-07-19 23:28:44 by paulb] Changed the notation to be consistent with that specified in XSLForms.Constants. diff -r bca5ee80a9fe -r 6a57c148df2d XSLForms/Fields.py --- a/XSLForms/Fields.py Tue Jul 19 22:40:50 2005 +0000 +++ b/XSLForms/Fields.py Tue Jul 19 23:28:44 2005 +0000 @@ -27,29 +27,29 @@ field entry consists of a field name mapped to a string value, where the field name may have the following formats: - /name1#n1/name2 - /name1#n1/name2#n2/name3 - /name1#n1/name2#n2/name3#n3/name4 + /name1$n1/name2 + /name1$n1/name2$n2/name3 + /name1$n1/name2$n2/name3$n3/name4 ... The indexes n1, n2, n3, ... indicate the position of elements (starting from 1) in the entire element list, whose elements may have different names. For example: - /zoo#1/name - /zoo#1/cage#1/name - /zoo#1/cage#2/name - /zoo#1/funding#3/contributor#1/name + /zoo$1/name + /zoo$1/cage$1/name + /zoo$1/cage$2/name + /zoo$1/funding$3/contributor$1/name Where multiple values can be collected for a given field, the following notation is employed: - /package#1/categories#1/category##value + /package$1/categories$1/category$$value Some fields may contain the "=" string. This string is reserved and all text following it is meant to specify a path into a particular document. For example: - _action_add_animal=/zoo#1/cage#2 + _action_add_animal=/zoo$1/cage$2 """ import Constants @@ -369,35 +369,35 @@ items = [ ("_action_update", "Some value"), - ("_action_delete=/zoo#1/cage#2", "Some value"), - ("/actions#1/update#1/selected", "Some value"), # Not actually used in output documents or input. - ("/zoo#1/name", "The Zoo זרו"), - ("/zoo#1/cage#1/name", "reptiles"), - ("/zoo#1/cage#1/capacity", "5"), - ("/zoo#1/cage#1/animal#1/name", "Monty"), - ("/zoo#1/cage#1/animal#1/species#1/name", "Python"), - ("/zoo#1/cage#1/animal#1/property#2/name", "texture"), - ("/zoo#1/cage#1/animal#1/property#2/value", "scaled"), - ("/zoo#1/cage#1/animal#1/property#3/name", "length"), - ("/zoo#1/cage#1/animal#1/property#3/value", "5m"), - ("/zoo#1/cage#1/animal#2/name", "Vincent"), - ("/zoo#1/cage#1/animal#2/species#1/name", "Lizard"), - ("/zoo#1/cage#1/animal#2/property#2/name", "colour"), - ("/zoo#1/cage#1/animal#2/property#2/value", "variable"), - ("/zoo#1/cage#1/animal#2/property#3/name", "length"), - ("/zoo#1/cage#1/animal#2/property#3/value", "1m"), - ("/zoo#1/cage#2/name", "mammals"), - ("/zoo#1/cage#2/capacity", "25"), - ("/zoo#1/cage#2/animal#1/name", "Simon"), - ("/zoo#1/cage#2/animal#1/species#1/name", "Giraffe"), - ("/zoo#1/cage#2/animal#2/name", "Leonard"), - ("/zoo#1/cage#2/animal#2/species#1/name", "Lion"), - ("/zoo#1/cage#2/animal#2/property#2/name", "danger"), - ("/zoo#1/cage#2/animal#2/property#2/value", "high"), - ("/zoo#1/funding#3/type", "private"), - ("/zoo#1/funding#3/contributor#1/name", "Animal Corporation"), - ("/zoo#1/funding#3/contributor#1/amount", "543210.987"), - ("/zoo#1/funding#3/contributor#1/industry##type", "animals") + ("_action_delete=/zoo$1/cage$2", "Some value"), + ("/actions$1/update$1/selected", "Some value"), # Not actually used in output documents or input. + ("/zoo$1/name", "The Zoo זרו"), + ("/zoo$1/cage$1/name", "reptiles"), + ("/zoo$1/cage$1/capacity", "5"), + ("/zoo$1/cage$1/animal$1/name", "Monty"), + ("/zoo$1/cage$1/animal$1/species$1/name", "Python"), + ("/zoo$1/cage$1/animal$1/property$2/name", "texture"), + ("/zoo$1/cage$1/animal$1/property$2/value", "scaled"), + ("/zoo$1/cage$1/animal$1/property$3/name", "length"), + ("/zoo$1/cage$1/animal$1/property$3/value", "5m"), + ("/zoo$1/cage$1/animal$2/name", "Vincent"), + ("/zoo$1/cage$1/animal$2/species$1/name", "Lizard"), + ("/zoo$1/cage$1/animal$2/property$2/name", "colour"), + ("/zoo$1/cage$1/animal$2/property$2/value", "variable"), + ("/zoo$1/cage$1/animal$2/property$3/name", "length"), + ("/zoo$1/cage$1/animal$2/property$3/value", "1m"), + ("/zoo$1/cage$2/name", "mammals"), + ("/zoo$1/cage$2/capacity", "25"), + ("/zoo$1/cage$2/animal$1/name", "Simon"), + ("/zoo$1/cage$2/animal$1/species$1/name", "Giraffe"), + ("/zoo$1/cage$2/animal$2/name", "Leonard"), + ("/zoo$1/cage$2/animal$2/species$1/name", "Lion"), + ("/zoo$1/cage$2/animal$2/property$2/name", "danger"), + ("/zoo$1/cage$2/animal$2/property$2/value", "high"), + ("/zoo$1/funding$3/type", "private"), + ("/zoo$1/funding$3/contributor$1/name", "Animal Corporation"), + ("/zoo$1/funding$3/contributor$1/amount", "543210.987"), + ("/zoo$1/funding$3/contributor$1/industry$$type", "animals") ] import time