Does anyone know if I can use an xml schema definition, such as a pattern
in the xforms bind statements within orbeon?  Or possibly use a pattern
directly within a bind statement?

For example:

<xforms:bind nodeset="/form/user/email" constraint=". =
'xsd:email_type'"/>

or

<xforms:bind nodeset="/form/user/email" constraint=". =
'A-Za-z0-9!#-'\*\+\-/=\?\^_`\{-~]+(\.[A-Za-z0-9!#-'\*\+\-/=\?\^_`\{-~]+)*@
[A-Za-z0-9!#-'\*\+\-/=\?\^_`\{-~]+(\.[A-Za-z0-9!#-'\*\+\-/=\?\^_`\{-~]+)*'
"/>


If either can be done an example would be VERY MUCH appreciated.

I know Micah Dubinko asked something about using schema before and that it
is in the bizdoc example but I don't "necessarily" want to validate the
entire instance against a schema just constrain an instance element or two
to a few distinct patterns such as telephone numbers and e-mail addresses
since the rest pretty much can be done with xforms:bind statements in the
instance data.

The bizdoc example has the following to validate against a schema but I'm
not sure I understand the flow of this document

Page-flow.xml:

...
<  page id  ="summary" path-info  ="/bizdoc" xforms
="summary/summary-xforms-model.xml" model  ="summary/summary-model.xpl"
view  ="summary/summary-view.xsl"  >
...

summary-model.xpl:

< p : config xmlns:p="http://www.orbeon.com/oxf/pipeline";>
   < p : param name ="data" type ="output" schema-href
="summary-model.xsd" />
   < p : processor name ="oxf:pipeline" >
      < p : input name ="config" href
="../data-access/delegate/list-documents.xpl" />
      < p : output name ="document-list" ref ="data" />
   </ p : processor >
</ p : config >

It looks like the document is retrieved from the database (and placed in
the instance document?  What is the role of the instance document?) and on
the output of the processor the retrieved data is validated against the
XSD but that is where I get lost.  What happens if the validation fails?
What does the user see?  Does the document simply get displayed using
summary-view.xsl regardless of the outcome of the validation?  Is the
xxforms_valid attribute added to ALL the XSD elements?  Would I even need
this:

<valid xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms";>
        <xsl:value-of select="not(//@xxforms:valid = 'false')"/>
</valid>

Or would the XSD validation take care of this?  Would I need any bindings
at all in the instance document itself?

 
V/R,
Gregory J Blajian



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to