- From: Mark Seaborne <MSeaborne@origoservices.com>
- Date: Mon, 18 Nov 2002 14:34:44 -0000
- To: <XForms@yahoogroups.com>
- Cc: <www-forms@w3.org>
Andrew Thanks. Well, there is a schema, and I take your point about the value of @id. However, given that all I'm actually doing is attempting to establish that one attribute in one part of a XML structure has the same value as another attribute in another part of a XML structure, I'm not sure that either point help directly. In fact, I'm not really making use of the fact the two attributes are of type xsd:id and xsd:idref, am I? I just wondered if anyone thinks that : <xfm:repeat nodeset="person" id="people"> <!-*person details here*--> <xfm:group id="address" ref="../address[@id = ../person[index('people')]/address/address_id]"> <!-*Address here--> </xsf:group> </xfm:repeat> ought, theoretically to work. Specifically, can I use index() to return the position of the current person node in the nodeset generated by the xfm:repeat? If not, maybe I need to take a quite different approach to the problem? All the best Mark -----Original Message----- From: AndrewWatt2001@aol.com [mailto:AndrewWatt2001@aol.com] Sent: 18 November 2002 14:06 To: XForms@yahoogroups.com Cc: www-forms@w3.org Subject: Re: [XForms] ID/IDREF relationships in XML instances In a message dated 18/11/2002 13:57:24 GMT Standard Time, MSeaborne@origoservices.com writes: <person id="1"> <forenames>Harold</forenames> <surname>Biggs</surname> <address address_id="c"/> </person> There can be more than one <person>, more than one <address> and more than one person/@address_id can point to one address/@id. Mark, Your problem may be totally unrelated but as I read through your code the first thing that struck me is that you are using an illegal value for the id attribute on the <person> element. The value of an ID attribute may not start with a numeric character. So id="1" is illegal. Secondly, the fact that an attribute has the name "id" does not automatically make it an ID attribute. There needs to be a DTD/schema which states that. You don't state whether such a DTD/schema exists. Either or both of those possible problems would stop an XML processor treating your code as if it had a legal ID attribute present. I hope that helps a little. Andrew Watt To unsubscribe from this group, send an email to: XForms-unsubscribe@egroups.com Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Received on Monday, 18 November 2002 09:35:14 UTC