Some more docs.

This commit is contained in:
rchantereau 2004-05-14 15:41:20 +00:00
parent 744d9c9b8d
commit 2ec61effde
4 changed files with 338 additions and 0 deletions

View File

@ -0,0 +1,98 @@
data.xml
========
<article>
...
...
...
</article>
description
===========
A description is a link between a XML object and his representation.
Our description file is "Article.xml".
Request
=======
'data.xml/edit'
Explanation
===========
- In this explanation, we are in the xmlHolder of data.xml.
- The *article* tag is a default *expression* root element, the "Article.xml" description file and the
*element* class used is the default scheme.
xmlHolder.walk(['edit'], 'GET', None):
- *xmlHolder* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
xmlHolder.walkToItem([], 'GET', None):
- call the next method.
document.getRootElement():
- get the *rootNode* (rootElement) of the libXML2 document.
elements.newElement(*rootNode*):
- Extract the node name and the namespace.
- Lookup the registered corresponding python class, or get the default python class.
- return the default class instance (in our case, *Element*).
- The returned *station* is not the same as actual *station*.
- The sequence is not empty.
- *isAccessAuthorized* for the specified command is true.
Element.walk(['edit'], 'GET', None):
- *Element* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*(['edit'], 'GET', None):
- return the *description* instance.
- The returned *station* is not the same as actual *station*.
- The sequence is not empty.
- *isAccessAuthorized* for the specified command is true.
description.walk(['edit'], 'GET', None):
- *description* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*(['edit'], 'GET', None):
- Look for a *page* node in the description named "edit".
- return the *Page* instance.
- The returned *station* is not the same as actual *station*.
- The sequence is empty.
- *isAccessAuthorized* for the specified command is true.
Page.walk([], 'GET', None):
- *Page* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*([], 'GET', None):
- return self
- The returned *station* is the same as actual *station*.
- The sequence is empty.
- *isAccessAuthorized* for the specified command is true.
- As 'GET' is the command, the *doHttpGet* method is called.
Page.doHttpGet()
- Do nothing.
Page.doHttpGetStyled()
- *generateHtmlDocument* generate a XHTML *document*.
- Apply XFORM to the selected file.
- Get the XSLT if applicable.
Page.outputHttpHtmlDocument()
- Apply the XSLT if applicable.
httpRequestHandler.outputData(string, '.../data.xml/action', mime/type, modificationDate)
Notes
=====
In order to access to more than one level, we have to code it for the moment.

View File

@ -0,0 +1,90 @@
data.xml
========
<myRoot>
...
...
...
</myRoot>
description
===========
A description is a link between a XML object and his representation.
Our description file is "myDescription.xml".
Request
=======
'data.xml'
Explanation
===========
- In this explanation, we are in the xmlHolder of data.xml.
- The *myRoot* tag is registered with our class *myRootElement*.
- The *myRoot* tag is registered with our description "myDescription.xml".
- The *walkToItem* and the *getDescription* method of our *station* class are not overridden (they use the
description system.
xmlHolder.walk([], 'GET', None):
- *xmlHolder* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
xmlHolder.walkToItem([], 'GET', None):
- call the next method.
document.getRootElement():
- get the *rootNode* (rootElement) of the libXML2 document.
elements.newElement(*rootNode*):
- Extract the node name and the namespace.
- Lookup the registered corresponding python class, or get the default python class.
- return the chosen class instance (in our case, the *myRootElement*).
- The returned *station* is not the same as actual *station*.
- The sequence is empty.
- *isAccessAuthorized* for the specified command is true.
myRootElement.walk([], 'GET', None):
- *myRootElement* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*([], 'GET', None):
- return the *myDescription* *description* instance.
- The returned *station* is not the same as actual *station*.
- The sequence is empty.
- *isAccessAuthorized* for the specified command is true.
myDescription.walk([], 'GET', None):
- *myDescription* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*([], 'GET', None):
- return self.
- The returned *station* is the same as actual *station*.
- The sequence is empty.
- *isAccessAuthorized* for the specified command is true.
- As 'GET' is the command, the *doHttpGet* method is called.
myDescription.doHttpGet()
- Do nothing.
myDescription.doHttpGetStyled()
- *generateHtmlDocument* generate a XHTML *document*.
- Apply XFORM to the selected file.
- Get the XSLT if applicable.
myDescription.outputHttpHtmlDocument()
- Apply the XSLT if applicable.
httpRequestHandler.outputData(string, '.../data.xml/action', mime/type, modificationDate)
Notes
=====
In order to access to more than one level, we have to code it for the moment.

View File

@ -0,0 +1,56 @@
data.xml
========
<myRoot>
...
...
...
</myRoot>
Request
=======
'data.xml/action'
Explanation
===========
*In this explanation, we are in the xmlHolder of data.xml. The myRoot tag is registered with our class myRootElement.*
xmlHolder.walk(['action'], 'GET', None):
- *xmlHolder* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
xmlHolder.walkToItem(['action'], 'GET', None):
- call the next method.
document.getRootElement():
- get the *rootNode* (rootElement) of the libXML2 document.
elements.newElement(*rootNode*):
- Extract the node name and the namespace.
- Lookup the registered corresponding python class, or get the default python class.
- return the chosen class instance (in our case, the *myRootElement*).
- The returned *station* is not the same as actual *station*.
- The sequence is not empty.
- *isAccessAuthorized* for the specified command is true.
myRootElement.walk(['action'], 'GET', None):
- *myRootElement* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*(['action'], 'GET', None):
- do nothing.
- *walkToAction*
- We have overridden the method.
httpRequestHandler.outputData(string, '.../data.xml/action', mime/type, modificationDate)
Notes
=====
In order to access to more than one level, we have to code it for the moment.

View File

@ -0,0 +1,94 @@
data.xml
========
<article>
...
...
...
</article>
description
===========
A description is a link between a XML object and his representation.
Our description file is "Article.xml".
Request
=======
POST 'data.xml/edit'
Explanation
===========
- In this explanation, we are in the xmlHolder of data.xml.
- The *article* tag is a default *expression* root element, the "Article.xml" description file and the
*element* class used is the default scheme.
xmlHolder.walk(['edit'], 'POST', None):
- *xmlHolder* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
xmlHolder.walkToItem([], 'POST', None):
- call the next method.
document.getRootElement():
- get the *rootNode* (rootElement) of the libXML2 document.
elements.newElement(*rootNode*):
- Extract the node name and the namespace.
- Lookup the registered corresponding python class, or get the default python class.
- return the default class instance (in our case, *Element*).
- The returned *station* is not the same as actual *station*.
- The sequence is not empty.
- *isAccessAuthorized* for the specified command is true.
Element.walk(['edit'], 'POST', None):
- *Element* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*(['edit'], 'POST', None):
- return the *description* instance.
- The returned *station* is not the same as actual *station*.
- The sequence is not empty.
- *isAccessAuthorized* for the specified command is true.
description.walk(['edit'], 'POST', None):
- *description* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*(['edit'], 'POST', None):
- Look for a *page* node in the description named "edit".
- return the *Page* instance.
- The returned *station* is not the same as actual *station*.
- The sequence is empty.
- *isAccessAuthorized* for the specified command is true.
Page.walk([], 'POST', None):
- *Page* is a *station*.
- *walkToEvaluation* returns *self*.
- *walkToContent*
- *walkToItem*([], 'POST', None):
- return self
- The returned *station* is the same as actual *station*.
- The sequence is empty.
- *isAccessAuthorized* for the specified command is true.
- As 'POST' is the command, the *doHttpPost* method is called.
Page.doHttpPost():
- return the next function return.
Page.prototype.submitValidateAndProcessContext():
- Apply the posted HTML form to the Page object with or without errors.
- Save the object to his attributed file path.
- Redirect to the same URL in 'GET'.
httpRequestHandler.outputData(string, '.../data.xml/action', mime/type, modificationDate)
Notes
=====
In order to access to more than one level, we have to code it for the moment.