Empty Repeats

there s a good reason why the spec says the instance should at least
have one template element, here is the reasoning why:

0) Element <instance> is a declaration --
and is needed --even if you have a schema because given a schema, you
cannot always  come up with a deterministic answer for what a template
node looks like.

Thus, if you have a shopping cart holding a set of items, you need a
template for  what item looks like --having just the schema for
element "item" wont be enough because as an example, the schema might
use choice, or other alternation mechnaisms in specifying what an
"item" can contain.
>>>>> "Guillermo" == Guillermo Menéndez <gmcorral@terra.es> writes:


    Guillermo> Hello, I was trying to find a way to make a Repeat
    Guillermo> structure that could have no initial elements, or at
    Guillermo> least that could display no elements when the form is
    Guillermo> loaded. This is because I'm using XForms to process
    Guillermo> external documents that maybe not always provide
    Guillermo> instance data for some of the Repeats. I have looked in
    Guillermo> the specification and it clearly says that initial
    Guillermo> instance data must be provided to construct the members
    Guillermo> to the homogeneous collection, but I though that maybe
    Guillermo> there is a way such as copying the repeat data from an
    Guillermo> inline instance, but I couldn't make it work. If anyone
    Guillermo> have any idea it would be very appreciated.

    Guillermo> Another issue is that when deleting the last element of
    Guillermo> a Repeat structure, at least in X-smiles, it doesn't
    Guillermo> let you insert new nodes anymore, until the form is
    Guillermo> reloaded. Maybe this is only a bug of X-smiles, because
    Guillermo> the specification doesn't say anything about this.

    Guillermo> Regards,

    Guillermo> Guillermo<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
    Guillermo> Transitional//EN"> <HTML><HEAD> <META
    Guillermo> http-equiv=Content-Type content="text/html;
    Guillermo> charset=iso-8859-1"> <META content="MSHTML
    Guillermo> 6.00.2800.1106" name=GENERATOR> <STYLE></STYLE> </HEAD>
    Guillermo> <BODY bgColor=#ffffff> <DIV><FONT face=Arial
    Guillermo> size=2>Hello, </FONT></DIV> <DIV><FONT face=Arial
    Guillermo> size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial
    Guillermo> size=2>I was trying to find a way to make a Repeat
    Guillermo> structure that could have no initial elements, or at
    Guillermo> least that could display no elements when the form is
    Guillermo> loaded. This is because I'm using XForms to process
    Guillermo> external&nbsp;documents that maybe not always provide
    Guillermo> instance data for some of the Repeats. I have looked in
    Guillermo> the specification and it clearly says that initial
    Guillermo> instance data must be provided to construct the members
    Guillermo> to the homogeneous collection, but I though that maybe
    Guillermo> there is a way such as copying the repeat data from an
    Guillermo> inline instance, but I couldn't make it work. If anyone
    Guillermo> have any idea it would be very
    Guillermo> appreciated.</FONT></DIV> <DIV><FONT face=Arial
    Guillermo> size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial
    Guillermo> size=2>Another issue is that when deleting the last
    Guillermo> element of a Repeat structure, at least in X-smiles, it
    Guillermo> doesn't let you insert new nodes anymore, until the
    Guillermo> form is reloaded. Maybe this is only a bug of X-smiles,
    Guillermo> because the specification doesn't say anything about
    Guillermo> this.</FONT></DIV> <DIV><FONT face=Arial
    Guillermo> size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial
    Guillermo> size=2>Regards,</FONT></DIV> <DIV><FONT face=Arial
    Guillermo> size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial
    Guillermo> size=2>Guillermo</FONT></DIV></BODY></HTML>

-- 
Best Regards,
--raman
------------------------------------------------------------
T. V. Raman:  PhD (Cornell University)
IBM Research: Human Language Technologies
Architect:    Conversational And Multimodal WWW Standards
Phone:        1 (408) 927 2608   T-Line 457-2608
Fax:        1 (408) 927 3012     Cell: 1 650 799 5724
Email:        tvraman@us.ibm.com
WWW:      http://www.cs.cornell.edu/home/raman
AIM:      TVRaman
PGP:          http://emacspeak.sf.net/raman.asc
Snail:        IBM Almaden Research Center,
              650 Harry Road
              San Jose 95120

Received on Thursday, 23 January 2003 12:50:02 UTC