Re: Translate uni example to inline editing
Christian Stocker <[email protected]> Tue, 24 Feb 2004 22:23:37 +0100
| Newsgroups | gmane.editors.bitflux.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Ok, the inlineXHTML example works now ;) I found the bug and fixed it somehow.. The problem was, that for included relaxng files, the possible different namespace-declaration were not honored (in relaxng.xml the default namespace was "" in schema/xhtml.rng.xml it's "http://www.w3.org/1999/xhtml"). That's now fixed. The other problem is, that you don't need a default namespace definition in each included files, but that it can be inherited from the including file. This, I couldn't fix quickly and as the intermediate-bug-avoding-solution is simple, I'll postponed the fix to later and filed a bug (http://bugs.bitfluxeditor.org/cgi-bin/bugzilla/show_bug.cgi?id=570). The solution is, just add the ns attribute to each <grammar> element in each file, then it works ;) I'll added them to all the RelaxNG files in examples/inlineXHTML/schema/. Now we could add image/table/lists support to that inlineXHTML example... I wanted to fix the examples this week, but I don't think I can do it soon. If anyone has its own examples or enhances/fixes our, please you're very wellcome to contribute back ;) BTW, there's an encoding issue, if your XML file isn't UTF-8 encoded. That's the next thing, I'll fix. Then we will release 0.9.4 (most presumably without complete examles...) chregu On 2/24/04 6:09 PM, Christian Stocker wrote: > Hi Michael > > On 2/24/04 5:32 PM, Michael Rolli wrote: > >> Hi chregu >> >> Started playing with current head version of bxeng. It really seems >> matured since I tried it last time. > > > yes, thanks to the university of zurich and their endless testing, we > have quite a mature product right now. > >> >> Especially I'm amazed about the unizh example and wondered if it's >> possible to translate this example into bitflux-cms. My current goal is >> to be able to have something like this: >> >> <iba> >> <tree/> >> <page> >> <Article> >> <main> >> <any code that's legal xhtml and would normally be >> <body>here</body>/> >> </main> >> </Article> >> </page> >> </iba> > > > that's a very wse thing to do ;) We will be switching from DocBook to > XHTML as well in our CMS for the mixed-content stuff. Handling of tables > and lists is then much easier to implement ;) > >> >> Found the starting point in xhtml/modules/struct.rng.xml (<define >> name="body"><ref name="Block.model"/></define>) and then tried it with a >> relax file like this: > > > Ok, I had a look into it. There seems to be a bug in BXE for that. > Couldn't locate it, but will try further. > > There's now a new example in CVS and the snapshot. inlineXHTML (not > linked from the startpage yet). the RelaxNG file is correct and the > content file inline.xml does validate against it (tested with jing from > http://www.thaiopensource.com/relaxng/jing.html a great tool to see, > who's wrong, BXE or your RelaxNG file ;) ) > > Will post my results later > > chregu > >> >> <?xml version="1.0" encoding="UTF-8"?> >> <grammar ns="" >> xmlns="http://relaxng.org/ns/structure/1.0" >> xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" >> xmlns:dc="http://purl.org/dc/elements/1.1/" >> xmlns:dcterms="http://purl.org/dc/terms/" >> xmlns:xhtml="http://www.w3.org/1999/xhtml" >> datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" >> > >> >> <include href="xhtml.rng.xml"> >> >> <start> >> <element name="iba"> >> <element name="tree"> >> <empty/> >> </element> >> <element name="page"> >> <element name="Article"> >> <attribute name="ID"> >> <data type="NCName"/> >> </attribute> >> <element name="ID"> >> <data type="integer"/> >> </element> >> <element name="main"> >> <ref name="Block.model"/> >> </element> >> <element name="title"> >> <text/> >> </element> >> <element name="lang"> >> <data type="NCName"/> >> </element> >> <element name="lang"> >> <text/> >> </element> >> <element name="uri"> >> <text/> >> </element> >> <element name="username"> >> <text/> >> </element> >> </element> >> </element> >> </element> >> </start> >> >> </include> >> >> </grammar> >> >> But actually this doesn't work. :-( Complaining e.g. about "b is not >> allowed as child of p" >> Is it possible at all? >> Where are the essential points to look after? >> Is it a ns issue? >> >> Thanks for any help on this. >> >> Cheerz >> Michael >> >> > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [email protected] | gnupg-keyid 0x5CE1DECB -- bx-editor-dev mailing list [email protected] http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev