Return-Path: Mailing-List: contact general-help@xml.apache.org; run by ezmlm Delivered-To: mailing list general@xml.apache.org Received: (qmail 85491 invoked from network); 26 Jan 2001 16:18:31 -0000 Received: from sj-msg-core-2.cisco.com (171.69.43.88) by h31.sny.collab.net with SMTP; 26 Jan 2001 16:18:31 -0000 Received: from sj-msg-av-1.cisco.com (sj-msg-av-1.cisco.com [171.69.11.130]) by sj-msg-core-2.cisco.com (8.9.3/8.9.1) with ESMTP id IAA06314 for ; Fri, 26 Jan 2001 08:18:19 -0800 (PST) Received: from mailman.cisco.com (localhost [127.0.0.1]) by sj-msg-av-1.cisco.com (8.10.1/8.10.1) with ESMTP id f0QGI9A19416 for ; Fri, 26 Jan 2001 08:18:09 -0800 (PST) Received: from plightbo-dsl5.cisco.com (plightbo-dsl4.cisco.com [10.20.80.101]) by mailman.cisco.com (8.9.3/CISCO.SERVER.1.2) with ESMTP id IAA15031 for ; Fri, 26 Jan 2001 08:18:03 -0800 (PST) Message-Id: <5.0.2.1.0.20010126081639.00aacec0@ce-nfs-1.cisco.com> X-Sender: plightbo@ce-nfs-1.cisco.com X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Fri, 26 Jan 2001 08:18:30 -0800 To: general@xml.apache.org From: Patrick Lightbody Subject: Re: getting a list of valid elements In-Reply-To: <802569E0.00324B94.00@mailhost.catalyst-solutions.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I have found two answers thus far (from the XForms mailing list that w3c is controlling): I'm getting a demo of a commercial product today sometime, I'll let you know how it goes. There is no info of this product on the web though, so I'm skeptical. I also was pointed to this open source project: http://www.infozone-group.org/index.html I'll keep you posted. -Pat At 09:12 AM 1/26/2001 +0000, you wrote: >I have been down this route too, with zero success (in fact I posted a >question on this list & got no responses at all). It seems quite >extraordinary, and very irritating, that you cannot obtain this information >through DOM when it's all there in the DTD. Of course you can read the DTD >line by line & parse it yourself, but I worked around it another way in my >application. >If you get any joy, please keep me posted - would appreciate it a lot. >Mandy > > > > > >Patrick Lightbody on 26/01/2001 01:25:25 > >Please respond to general@xml.apache.org > >To: general@xml.apache.org >cc: (bcc: Mandy Shaw/Pacific/UK) >Subject: getting a list of valid elements > > > > >I have explored using Xerces and Oracle's XML parsers to be able to create >a simple web-based XML editor. Consider this sample use-case: > >I have a DTD or XML Schema that defines the grammar as: > >#PCDATA >#PCDATA >#PCDATA >... >#PCDATA > > >I need to present a web-based form for one textfield with input for the >PCDATA for "bar #1". Since the grammar defines that must have 1 or >more elements. So somehow I need to get my class to "know" that "foo" >can have one or more "bar" elements. It must also know that "bar" can have >no child elements, but can have many "bar" siblings. Is this possible? XML >Spy has helpers in the application that present the "expected elements" >defined by the XML grammar, yet I can't find any parser that allows for >this. > >Obviously if a validating parser can throw an Exception if I add an >*unexpected* element to the tree, it must somehow know which elements are >*expected*. Is it possible to get that list of expected elements? With this >"list" of expected child and sibling elements, I could be able to build a >simple web-bases XML editor that would prompt for data inputs, entirely >independent of the XML schema/DTD. > >-Pat > > >--------------------------------------------------------------------- >In case of troubles, e-mail: webmaster@xml.apache.org >To unsubscribe, e-mail: general-unsubscribe@xml.apache.org >For additional commands, e-mail: general-help@xml.apache.org > > > > > Regards, > Mandy Shaw > > Catalyst Solutions plc > Kingfisher House > Frimley Business Park > Camberley > Surrey > GU16 5SG > UK > > http://www.catalyst-solutions.com > Email: Mandy.Shaw@uk.catalyst-solutions.com > > Telephone: +44 (0)870 166 1000 > DDI: +44 870 166 1324 > Facsimile: +44 870 168 3920 > Mobile: +44 410 447966 > > > > > > >---------------------------------------------------------------------- >Catalyst Solutions plc. Registered No 2918101. >Registered @ Kingfisher House, Frimley Business Park, Frimley, >Surrey. GU16 5SG U.K. > >NOTICE: >This message is intended only for the named addressee(s) and may >contain confidential and/or privileged information. If you are not the >named addressee you should not disseminate, copy or take any action >or place any reliance on it. If you have received this message in error >please notify postmaster@catalyst-solutions.com and delete the message >and any attachments accompanying it immediately. >---------------------------------------------------------------------- > > > >--------------------------------------------------------------------- >In case of troubles, e-mail: webmaster@xml.apache.org >To unsubscribe, e-mail: general-unsubscribe@xml.apache.org >For additional commands, e-mail: general-help@xml.apache.org