cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Koberg" <...@koberg.com>
Subject RE: Designing Dialogs in XML
Date Tue, 03 Dec 2002 09:58:18 GMT
Hi,

Since cocoon is moving to Relax NG schemas, why not build your forms from that?

For example:

  <rng:define name="page">
    <rng:element name="page">
      <rng:ref name="page.attrlist"/>
      <rng:zeroOrMore>
        <rng:ref name="col"/>
      </rng:zeroOrMore>
    </rng:element>
  </rng:define>

  <rng:define name="page.attrlist">
    <rng:attribute name="print_friendly">
      <a:attr label="Print friendly" dflt="false">
        <a:description>Indicates whether a print friendly page should be
generated</a:description>
      </a:attr>
      <rng:data type="boolean"/>
    </rng:attribute>
    <rng:ref name="title.attr"/>
    <rng:ref name="xsl_fileref.attr"/>
  </rng:define>

  <rng:define name="title.attr">
    <rng:attribute name="title">
      <a:attr label="Title" dflt="">
        <a:description>A text title</a:description>
      </a:attr>
      <rng:data type="token"/>
    </rng:attribute>
  </rng:define>
  <rng:define name="xsl_fileref.attr">
    <rng:attribute name="xsl_fileref">
      <a:attr label="XSL ref" dflt="default">
        <a:description>A name of the primary XSL template to be
used</a:description>
      </a:attr>
      <rng:choice>
        <rng:value type="NMTOKEN">default</rng:value>
        <rng:value type="NMTOKEN">something-else</rng:value>
      </rng:choice>
    </rng:attribute>
  </rng:define>

I am taking some liberties with the annotation in the schema as it is currently
defined, but it still validates (both the schema and the XML instance).
Transform this into your form using the annotations to fill out whatever else
needs to be in the form. Perhaps cocoon devs could come up with an altered RNG
Schema (the one that validates the RNG schema itself) for these additional
annotations. By the way it is pretty easy to transform this into a set of JS
objects (client - or server side, if necessary). Note: the //a:attr/@dflt is
spelled the way it is so it can work in JS.

best,
-Rob



> -----Original Message-----
> From: Ovidiu Predescu [mailto:ovidiu@apache.org]
> Sent: Monday, December 02, 2002 11:42 PM
> To: cocoon-dev@xml.apache.org
> Subject: Re: Designing Dialogs in XML
>
>
> Matthew,
>
> I was talking to Stefan Sofariu at GetTogether and he mentioned XUL
> from Mozilla in the same context of an XML language to define controls
> which are independent of HTML. The event and object model is a bit
> different though, but nevertheless XUL would be a great markup to use
> to define controls on a page.
>
> One nice thing about XUL's event model, which is heavily based on
> JavaScript, is that it could translate to the control flow quite easy.
> This would be a real killer app for the control flow, since a XUL
> application for Mozilla could run within Cocoon as well! There would be
> a lot of plumbing required to emulate the object model available in
> XUL, but it would be really interesting.
>
> Regards,
> Ovidiu
>
> On Monday, Dec 2, 2002, at 00:27 US/Pacific, Matthew Langham wrote:
>
> > Hi,
> >
> > thanks for the pointers. Yes this is roughly what I had in mind. I was
> > however surprised that I couldn't find anything standardized.
> >
> > But this morning Carsten pointed me to XFrames
> > (http://www.w3.org/TR/2002/WD-xframes-20020806/) and together with the
> > XMLForm stuff, I think that is what we are looking for.
> >
> > Matthew
> >
> > --
> > Open Source Group       Cocoon { Consulting, Training, Projects }
> > =================================================================
> > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
> > -----------------------------------------------------------------
> > Cocoon book:
> >   http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
> > Weblog:
> >   http://radio.weblogs.com/0103021/
> > =================================================================
> >
> >
> > -----Original Message-----
> > From: Ivelin Ivanov [mailto:ivelin@apache.org]
> > Sent: Saturday, November 30, 2002 4:55 PM
> > To: cocoon-dev@xml.apache.org
> > Subject: Re: Designing Dialogs in XML
> >
> >
> >
> > If I understand correctly, the thing you're looking for exists.
> > Look at the WebServiceProxyGenerator demos.
> > One of them uses only the XMLForm stylesheet which simple transforms a
> > XMLForm markup into HTML markup,
> > without using any of the other XMLForm components (action, transformer,
> > validator).
> > The other one (cocoonhive mini-portal) is using a "page" markup very
> > similar
> > to the one in your example.
> > I guess the src="/resources/header" part can be conveniently replaced
> > with a
> > CInclude or an XInclude
> > (again look at the cocoonhive main document).
> >
> > Let me know if this helped any.
> >
> >
> > Ivelin
> >
> > [1] WSPG demo
> > http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/webapp/samples/
> > webservicep
> > roxy/
> >
> > [2] Cocoonhive demo portal main doc
> > http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/webapp/samples/
> > webservicep
> > roxy/cocoonhive/portal/
> >
> > [3] XMLForm to HTML without any validation overhead, etc.
> > http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/webapp/samples/
> > webservicep
> > roxy/sitemap.xmap?rev=HEAD&content-type=text/vnd.viewcvs-markup
> >
> >
> >
> > ----- Original Message -----
> > From: "Matthew Langham" <mlangham@s-und-n.de>
> > To: <cocoon-dev@xml.apache.org>; "Cocoon-Users@Xml. Apache. Org"
> > <cocoon-users@xml.apache.org>
> > Sent: Saturday, November 30, 2002 7:41 AM
> > Subject: Designing Dialogs in XML
> >
> >
> > We have the need to do the following - and for the life of me I have
> > not yet
> > found anything that already does this - although I am sure there must
> > be...
> >
> > 1) Define page layouts in an XML markup
> >
> > example:
> >
> > page1.xml
> >
> >   <page name="firstpage">
> >     <part name="toppart" src="/resources/header"/>
> >     <part name="middlepart">
> >       This is the middle
> >     </part>
> >     <part src="/resources/dialog">
> >   </page>
> >
> > Depending on the stylesheet used in the later formatting this would
> > then be
> > transformed to say a frameset (HTML) or different cards (WML).
> >
> > 2) Define dialog elements in an XML markup
> >
> > Define things like text fields, buttons etc. in a way so that a later
> > step
> > makes the transformation into the specific instance for the required
> > end
> > format.
> >
> > So the above link to /resources/dialog would then load an XML file
> > containing the description of a particular dialog into the third part
> > of the
> > page.
> >
> >
> > I really only need this in one direction at the moment (i.e. publishing
> > stuff outwards) - so I don't need the overhead of validation etc.
> >
> > Apart from inventing some new XML formats for this - surely there must
> > be
> > something like this already out there? I've looked at XUL, XMLForms
> > etc. but
> > they don't seem right - but perhaps they are.
> >
> > Matthew
> >
> > --
> > Open Source Group       Cocoon { Consulting, Training, Projects }
> > =================================================================
> > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > Tel:+49-5251-1581-30 mlangham@s-und-n.de - http://www.s-und-n.de
> > -----------------------------------------------------------------
> > Cocoon book:
> >   http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
> > Weblog:
> >   http://radio.weblogs.com/0103021/
> > =================================================================
> >
> >
> > -----Original Message-----
> > From: Matthew Langham [mailto:mlangham@s-und-n.de]
> > Sent: Saturday, November 30, 2002 1:53 PM
> > To: cocoon-dev@xml.apache.org
> > Subject: RE: Summary: Cocoon Stammtisch @ Frankfurt
> >
> >
> >>>
> > easily accessed via public transport. Michael Melhem proposed an irish
> > pub at Frankfurt/Hauptbahnhof (@Michael: "main train station", so I
> > made
> > an educated guess - right ? Do you have a phone number of that pub ?)
> > which should reduce any travelling by public transport to a minimum,
> > but
> > I fear that we lack the possibility to reserve for up to 13 people,
> > having a meal or a noise level suited for a decent conversation, but I
> > <<
> >
> > The Irish pub in Paderborn would not be suited for this (very loud) -
> > but
> > perhaps Frankfurt-Irish are quieter :-)
> >
> > So -1 on that.
> >
> >>>
> > Frankfurt/Höchst, about 3 train stations (or 9 minutes) from
> > Frankfurt/Hauptbahnhof, which is close to the train station,  large
> > enough for us, provides good yugoslavian food and you can have a good
> > talk over there; all this needs is using the local train towards the
> > city - at 00:39, the latest train (S1 direction "Offenbach Ost") heads
> > towards the city.
> > <<
> >
> > Sounds good. Is it easy to get to by car also? Carsten and I will
> > probably
> > be driving in to Frankfurt.
> >
> > So +1 on that one.
> >
> > (I would be +1000 for the Schnitzel place - btw. Yummmy! Still, lack of
> > public transport is a problem)
> >
> > Matthew
> >
> > --
> > Open Source Group       Cocoon { Consulting, Training, Projects }
> > =================================================================
> > Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> > Tel:+49-5251-1581-30 mlangham@s-und-n.de - http://www.s-und-n.de
> > -----------------------------------------------------------------
> > Cocoon book:
> >   http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
> > Weblog:
> >   http://radio.weblogs.com/0103021/
> > =================================================================
> >
> >
> > -----Original Message-----
> > From: Michael Hartle [mailto:mhartle@hartle-klug.com]
> > Sent: Saturday, November 30, 2002 1:03 PM
> > To: cocoon-dev@xml.apache.org
> > Subject: OT: Summary: Cocoon Stammtisch @ Frankfurt
> >
> >
> > Hello all,
> >
> > to finalize the planing, I'd like to sum up some aspects; I am hoping
> > for some *quick* feedback (i.e. votes) regarding the location, so I can
> > make a reservation at one place or another:
> >
> > * Who: Regarding the guests, the list has grown considerably compared
> > to
> > the last Stammtisch - hopefully I haven't forgot anyone, but currently
> > it looks like Marcus Crafter, Michael Melhem, Wolfram Eisert, Christian
> > Haul, Mariano Kamp, Torsten Curdt, Matthew Langham, Carsten Ziegeler
> > and
> > Andreas Fuchs plus myself are probably going to visit, making it 10
> > people; when our "international" guests can make it too, we'd be 13 -
> > well, I am not superstitious, but anyone is invited to increase that
> > number.
> >
> > * When: As a date for the Stammtisch, we more or less settled on
> > December, 9th; we might even have some guests from the UK (Andrew
> > Savory), Belgium (Steven Noels) and perhaps Italy (Nicola Ken Barozzi).
> >
> > * Where: Here, we still have to decide - due to lacking public
> > transport
> > connectivity and the necessity for un-alcoholized drivers for the
> > Schnitzel armageddon, we need an alternative location (*sigh*) that is
> > easily accessed via public transport. Michael Melhem proposed an irish
> > pub at Frankfurt/Hauptbahnhof (@Michael: "main train station", so I
> > made
> > an educated guess - right ? Do you have a phone number of that pub ?)
> > which should reduce any travelling by public transport to a minimum,
> > but
> > I fear that we lack the possibility to reserve for up to 13 people,
> > having a meal or a noise level suited for a decent conversation, but I
> > may be wrong. An alternative proposal of mine was a good restaurant at
> > Frankfurt/Höchst, about 3 train stations (or 9 minutes) from
> > Frankfurt/Hauptbahnhof, which is close to the train station,  large
> > enough for us, provides good yugoslavian food and you can have a good
> > talk over there; all this needs is using the local train towards the
> > city - at 00:39, the latest train (S1 direction "Offenbach Ost") heads
> > towards the city.
> >
> > Gentlemen, place your votes.
> >
> >
> > Best regards,
> >
> > Michael Hartle,
> > Hartle & Klug Consulting GmbH
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message