Le lundi 31 janvier 2005 � 11:46 +0100, Erik Bruchez a �crit : > Eric van der Vlist wrote: > > > This is controversial, but yes, I do think that it's a good > > practise :-)... > > I can see how this can be controversial ;-)
I do much more consulting around XML vocabularies themselves than development and I am probably biased toward user friendly vocabularies more than toward easy to implement ones... > > > I would say for foreign attributes and for foreign elements where they > > are not too troublesome, ie in complex contents. The problem with > > allowing foreign elements in simple contents is that they transform > > these simple contents in mixed content models that are much more tough > > to process. > > We had recently a similar question related to the particular case of > XInclude, which doesn't work out of the box with the PFC and XPL because > the schema is too restrictive. Not because of the actual xi:include > elements, but because the result of the inclusion produces xml:base > attributes. Here, we clearly want to allow those attributes. But the > plan was to specifically allow for xml:base. xml:base is different IMO. Supporting xml:base has an impact on the vocabulary since your href wouldn't have exactly the same behaviour. What we're speaking here are foreign elements and attributes that would have 0 impact on the vocabulary... > > In that two cases (foreign attributes and foreign elements in simple > > contents), many applications using DOM won't even notice these additions > > and other applications can easily be programmed to ignore foreign > > namespaces. > > Still, while not much more difficult to code, it makes testing more > difficult: you must test your application by providing documents that > can pretty much contain random elements and attributes all over the > place. A little drawback, which is not problematic if there are benefits > to balance this. > > > In the case of XHTML, that's a controlled openness, with practises > > described in the modularization of XHTML, but still, I think that this > > openness is the foundation that has made XForms possible. > > It definitely makes sense for XHTML and for that kind of document > formats in general, because the notion of embedding / compounding is > necessary (or at least very convenient and accepted practice) for such > applications. E.g. embedding SVG or MathML in XHTML. I am 200% sold on > this one. > > For custom annotations though, I am not quite sure. Won't your XPL and > PFC files look overloaded and confusing if people start annotating left > and right with their own elements? I don't really buy arguments that say that language features need to be restricted for the sake of the users :-) ... A Java program can look overloaded and confusing if people put confusing comments. Is that a reason to limit where comments should be allowed? Users who can write XPL pipes are probably wise enough to use the possibility offered by the language... > I am comparing this approach to the > XML Schema approach, where user content is restricted to very specific > places. I don't like that approach that much and prefer RNG's one :-) ... > > In another area, probably closer to XPL than XHTML, schema language > > annotations enable all kind of interesting applications that I have > > described in a chapter of my RNG book : > > http://books.xmlschemata.org/relaxng/RngBookAnnotations.html . > > I remember now that Relax NG allows this. > > Not that this is actually a great solution, but I should mention that > you could use XSLT to clean-up the PFC document. The PFC is actually a > processor like any other, with a "controller" input taking the PFC > configuration. Instead of using the Page Flow processor as main > processor in the application, you could use the Pipeline processor > instead. That pipeline would read the PFC configuration, filter it, and > send it to the PFC processor. Assuming both the PFC file and the > stylesheet are static, caching will make sure that there is no > performance hit. In a sense, this is almost what RNG specifies... To find a balance between a minimal language that is easy to implement and a user friendly language that is easy to use and read, the RNG specification defines: * A user friendly language that allows shortcuts (for instance "mixed", zeroOrMore", ...), modularity (redefinitions, inclusions, external references) and foreign elements and attributes. * A very minimal set of elements (simplified RNG) that contains only the elements absolutely required for the expressive power of the language. * A simplification process that says how to simplify schemas. What you suggest here is to "externalise" this simplification while I think it could be internal :-) ... BTW, this approach (full, simplified, simplification) is something that might help you describing XPL. It lets you concentrate on defining the semantics of the simplified set and easily add features through this simplification process without changing the semantics of the simplified set. I find that very powerful and quite generic. > With this solution, you could have your own annotated files today. The > PFC receives them clean of annotations, but of course your own code uses > them with the annotations. Sure, that's an option. What I have done right now is that I have located them in my "theme.xsl": <ap:map> <ap:page name="home" path="/apiculteurs/">Accueil</ap:page> <ap:page name="admin" role="ApiculteursAdmin" path="/apiculteurs/administration" >Administration</ap:page> <ap:page name="exemple" path="/apiculteurs/apiculteur/exemple/">Exemple</ap:page> <ap:page name="formulaire" path="/apiculteurs/formulaire">Formulaire</ap:page> <ap:page name="formulairePDF" path="/apiculteurs/formulaire.pdf">formulaire au format PDF</ap:page> ... </ap:map> <ap:menu title="Dans le site :"> <ap:link ref="home"/> <ap:link ref="liste"/> <ap:link ref="admin"/> <ap:link ref="exemple"/> <ap:link ref="formulaire"/> </ap:menu> These definitions can then be accessed through "document('')/*/ap:map". That's working fine too, but their natural home would be page-flow.xml IMO... Thanks, Eric -- Freelance consulting and training. http://dyomedea.com/english/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------ ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
