Discussion:
Translate uni example to inline editing
Michael Rolli
2004-02-24 16:32:41 UTC
Permalink
Hi chregu

Started playing with current head version of bxeng. It really seems
matured since I tried it last time.

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>


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:

<?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
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Christian Stocker
2004-02-24 17:09:56 UTC
Permalink
Hi Michael
Post by Michael Rolli
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.
Post by Michael Rolli
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
<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 ;)
Post by Michael Rolli
Found the starting point in xhtml/modules/struct.rng.xml (<define
name="body"><ref name="Block.model"/></define>) and then tried it with a
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
Post by Michael Rolli
<?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 | ***@bitflux.ch | gnupg-keyid 0x5CE1DECB
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Christian Stocker
2004-02-24 21:23:37 UTC
Permalink
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
Post by Christian Stocker
Hi Michael
Post by Michael Rolli
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.
Post by Michael Rolli
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
<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 ;)
Post by Michael Rolli
Found the starting point in xhtml/modules/struct.rng.xml (<define
name="body"><ref name="Block.model"/></define>) and then tried it with a
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
Post by Michael Rolli
<?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 | ***@bitflux.ch | gnupg-keyid 0x5CE1DECB
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Christian Stocker
2004-02-26 10:34:52 UTC
Permalink
Hi
Hi Chregu
Post by Christian Stocker
Ok, the inlineXHTML example works now ;) I found the bug and
fixed it somehow..
Yes it does and it's so brillant. ;-) Love it.
Putting this stuff into the cms environment I have some problems now. In
there it doesn't work correctly anymore and I'm pretty sure that the
<main xmlns:xhtml="http://www.w3.org/1999/xhtml">
I get
*****
<main xmlns:xhtml="http://www.w3.org/1999/xhtml">

<xhtml:p>
Bitflux Editor is a browser based Wysiwyg XML
Editor – and that changes everything! You can edit now your content
semantically and at the same time display it to your users and editors
in its final form.
</xhtml:p>
etc..
***

which looks ok to me. <main> has no namespace (as all the others also
don't have), but the xhtml elements within main du have the
XHTML-namespace. I don't see anything wrong there. Do you expect <main>
to be in the XHTML namespace as well? Then you'd have to change the
content.xml and the relaxng specs

chregu
I can't find the code where this stuff is put togehter. Where do you
build this /iba/page/main stuff together?
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 | ***@bitflux.ch | gnupg-keyid 0x5CE1DECB
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Michael Rolli
2004-02-26 14:23:28 UTC
Permalink
That's the output of /admin/wysiwyg/getArticle/705
http://aumwww.unibe.ch/~mr/bxecmstests/article705.txt
mmmh, the namespace declarations are missing here and some
xhtml elements don't have a namespace at all. Did you
Was just too lazy, therefore not all of them had with xhtml-ns. ;^)
copy&paste from the Mozilla XML View? Try "View Source", this
should give you the actual sent document, not an interpreted one ;)
Nope. Done with wget and piped into the file. not interpreted.
BTW: I've done it again and completed those ns things inside main
before.
Same url as above.
That's the output of "Debug -> Show XML Document" in editor (same
article)
http://aumwww.unibe.ch/~mr/bxecmstests/debug_show_xml_output.txt
really strange. I just tested with your document (fixed with
namespaces) on the inlineXHTML example and there it shows the
as prefix instead of xhtml: but that doesnt matter. and maybe
it's just my developement version of bxe, which screws up the
prefixes right now)
That's actually the stuff (/iba/page/Article/main) as I see in source
mode of editor. (the same as in Show XML Document):

<p> Lorem <b>ipsum</b> dolor sit amet, consectetuer adipiscing elit, sed
diam nonummy nibh euismod tincidunt ut laoreet dolore <sub>magna aliquam
erat volutpat. Ut wisi enim </sub>ad minim veniam, quis nostrud exerci
tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
consequat. Duis autem vel eum iriure do<b>lor in hendrerit in vulputate
velit esse molestie consequat, vel illum dolore eu feugiat nulla
facilisis </b>at vero eros et accumsan et iusto odio dignissim qui
blandit praesent luptatum zzril delenit augue duis dolore te feugait
nulla facilisi. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem ve<i>l eum iriure dolor in hendrerit in vulpu</i>tate velit
esse molest<sup>ie consequat, vel illum dolore eu feugiat</sup> nulla
facilisis at vero eros et accumsan et iusto odio dignissim qui blandit
praesent luptatum zzril delenit augue duis dolore te feugait nulla
facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat. </p>
which mozilla version are you using?
BXE Version: 0.9.3-dev
BXE Build Date: 200402201805
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5)
Gecko/20031007
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Christian Stocker
2004-02-26 13:53:59 UTC
Permalink
Hi
If yes, can you send me that document and I'll have a look ;)
If no, there's a problem with that pipeline somewhere.
That's the output of /admin/wysiwyg/getArticle/705
http://aumwww.unibe.ch/~mr/bxecmstests/article705.txt
mmmh, the namespace declarations are missing here and some xhtml
elements don't have a namespace at all. Did you copy&paste from the
Mozilla XML View? Try "View Source", this should give you the actual
sent document, not an interpreted one ;)
That's the output of "Debug -> Show XML Document" in editor (same
article)
http://aumwww.unibe.ch/~mr/bxecmstests/debug_show_xml_output.txt
really strange. I just tested with your document (fixed with namespaces)
on the inlineXHTML example and there it shows the namespaces.. (with a0:
as prefix instead of xhtml: but that doesnt matter. and maybe it's just
my developement version of bxe, which screws up the prefixes right now)

which mozilla version are you using?

chregu
Somehow, while the editor is putting the code into the editable-div the
ns-stuff get's lost.
Anything else you need to know?
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 | ***@bitflux.ch | gnupg-keyid 0x5CE1DECB
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Michael Rolli
2004-02-26 14:39:47 UTC
Permalink
Me again. ;^)

Ok, I took my article705.txt xml code and used it as "inline.xml" in the
inlineXHTML-example. And it didn't worked. Same troubles as in
CMS-Environment.
So, then I changed the following thing:
<main> -> <main xmlns:xhtml="http://www.w3.org/1999/xhtml">

And then it worked!!!! ;^)
So, this xmlns:xhtml declaration in the <main>-elemnt is actually
important, very important. bxeng stopped dropping this <xhtml: -stuff

How can I make the bifluxgenerator-pipeline to add this declaration to
the standard <main>-element which I currently getting?

Cheers, Michael
-----Original Message-----
Sent: Thursday, February 26, 2004 3:23 PM
Subject: RE: [bx-editor-dev] Translate uni example to inline editing
Post by Christian Stocker
That's the output of /admin/wysiwyg/getArticle/705
http://aumwww.unibe.ch/~mr/bxecmstests/article705.txt
mmmh, the namespace declarations are missing here and some xhtml
elements don't have a namespace at all. Did you
Was just too lazy, therefore not all of them had with xhtml-ns. ;^)
Post by Christian Stocker
copy&paste from the Mozilla XML View? Try "View Source", this
should give you the actual sent document, not an interpreted one ;)
Nope. Done with wget and piped into the file. not interpreted.
BTW: I've done it again and completed those ns things inside
main before.
Same url as above.
Post by Christian Stocker
That's the output of "Debug -> Show XML Document" in editor (same
article)
http://aumwww.unibe.ch/~mr/bxecmstests/debug_show_xml_output.txt
really strange. I just tested with your document (fixed with
namespaces) on the inlineXHTML example and there it shows the
as prefix instead of xhtml: but that doesnt matter. and maybe
it's just my developement version of bxe, which screws up the
prefixes right now)
That's actually the stuff (/iba/page/Article/main) as I see
<p> Lorem <b>ipsum</b> dolor sit amet, consectetuer
adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore <sub>magna aliquam erat volutpat. Ut wisi enim
</sub>ad minim veniam, quis nostrud exerci tation ullamcorper
suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure do<b>lor in hendrerit in vulputate
velit esse molestie consequat, vel illum dolore eu feugiat
nulla facilisis </b>at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue
duis dolore te feugait nulla facilisi. Ut wisi enim ad minim
veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat. Duis autem
ve<i>l eum iriure dolor in hendrerit in vulpu</i>tate velit
esse molest<sup>ie consequat, vel illum dolore eu
feugiat</sup> nulla facilisis at vero eros et accumsan et
iusto odio dignissim qui blandit praesent luptatum zzril
delenit augue duis dolore te feugait nulla facilisi. Lorem
ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat. </p>
Post by Christian Stocker
which mozilla version are you using?
BXE Version: 0.9.3-dev
BXE Build Date: 200402201805
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.5) Gecko/20031007
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Christian Stocker
2004-02-26 16:55:57 UTC
Permalink
Post by Michael Rolli
Me again. ;^)
Ok, I took my article705.txt xml code and used it as "inline.xml" in the
inlineXHTML-example. And it didn't worked. Same troubles as in
CMS-Environment.
<main> -> <main xmlns:xhtml="http://www.w3.org/1999/xhtml">
ok, one solution would be to try to add the namespacedeclaration into
the xml document with an xslt transformation in the getArticle pipeline.
Something like

<xsl:template match="/">
<iba xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:copy-of select="*"/>
</iba>
</xsl:template>

could work.

BXE needs the xhtml declaration somewhere outside... which is actually a
bug ;)

You could also hack the bitfluxcms generator, but that's too much work, IMHO

chregu
Post by Michael Rolli
And then it worked!!!! ;^)
So, this xmlns:xhtml declaration in the <main>-elemnt is actually
important, very important. bxeng stopped dropping this <xhtml: -stuff
How can I make the bifluxgenerator-pipeline to add this declaration to
the standard <main>-element which I currently getting?
Cheers, Michael
-----Original Message-----
Sent: Thursday, February 26, 2004 3:23 PM
Subject: RE: [bx-editor-dev] Translate uni example to inline editing
Post by Christian Stocker
That's the output of /admin/wysiwyg/getArticle/705
http://aumwww.unibe.ch/~mr/bxecmstests/article705.txt
mmmh, the namespace declarations are missing here and some xhtml
elements don't have a namespace at all. Did you
Was just too lazy, therefore not all of them had with xhtml-ns. ;^)
Post by Christian Stocker
copy&paste from the Mozilla XML View? Try "View Source", this
should give you the actual sent document, not an interpreted one ;)
Nope. Done with wget and piped into the file. not interpreted.
BTW: I've done it again and completed those ns things inside
main before.
Same url as above.
Post by Christian Stocker
That's the output of "Debug -> Show XML Document" in editor (same
article)
http://aumwww.unibe.ch/~mr/bxecmstests/debug_show_xml_output.txt
really strange. I just tested with your document (fixed with
namespaces) on the inlineXHTML example and there it shows the
as prefix instead of xhtml: but that doesnt matter. and maybe
it's just my developement version of bxe, which screws up the
prefixes right now)
That's actually the stuff (/iba/page/Article/main) as I see
<p> Lorem <b>ipsum</b> dolor sit amet, consectetuer
adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore <sub>magna aliquam erat volutpat. Ut wisi enim
</sub>ad minim veniam, quis nostrud exerci tation ullamcorper
suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure do<b>lor in hendrerit in vulputate
velit esse molestie consequat, vel illum dolore eu feugiat
nulla facilisis </b>at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue
duis dolore te feugait nulla facilisi. Ut wisi enim ad minim
veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat. Duis autem
ve<i>l eum iriure dolor in hendrerit in vulpu</i>tate velit
esse molest<sup>ie consequat, vel illum dolore eu
feugiat</sup> nulla facilisis at vero eros et accumsan et
iusto odio dignissim qui blandit praesent luptatum zzril
delenit augue duis dolore te feugait nulla facilisi. Lorem
ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat. </p>
Post by Christian Stocker
which mozilla version are you using?
BXE Version: 0.9.3-dev
BXE Build Date: 200402201805
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.5) Gecko/20031007
--
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 | ***@bitflux.ch | gnupg-keyid 0x5CE1DECB
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Loading...