Re: A very simple example (part I)

Troy Farrell <[email protected]> Mon, 03 Feb 2003 13:31:45 -0600
Newsgroups gmane.editors.bitflux.devel
Organization Entheos Software
Message-ID <[email protected]>
Yes! Yes!  This helps.  This is good.

I looked at the files and the workings of the editor are making more 
sense.  I'll try to play with this soon.  I, like you, have a few things 
to do right now, but soon...

Thank you.

Troy

Christian Stocker wrote:
> Hi
> 
> here's the promised very simple bxe example with some explinations, what
> i've done with it.
> 
> All the needed files can be download from
> http://trash.chregu.tv/bxe_simple.tgz for the time being (I will put
> this howto somewhere more appropriate later, so the above link will also
> change). The files can also be looked at online. go to
> http://trash.chregu.tv/bxe/ and click through.
> Ok, here we go:
> 
> First we need an xml file with the data. I took a very simple example
> (not really docbook, but if I'd choose docbook, it would have been too
> long again..) See http://trash.chregu.tv/bxe/xml/data.xml . Not much to
> say about that ;)
> 
> Second, we need an xsl file
> (http://trash.chregu.tv/bxe/xml/transform.xsl ). This needs some special
> stuff. First, at the moment, we need always a <xsl:template match="*">
> template, because otherwise not all needed nodes are transformed.
> Besides that template, we only have one other template in this example,
> which matches the root node and outputs all the needed HTML tags. The
> main interest in this template should go into:
> 
> <article contentEditable="true">
>   <xsl:for-each select="article">
>     <xsl:apply-templates/>
>   </xsl:for-each>
> </article>
> 
> This is at the moment the standard way of making a node and all his
> subnodes editable (We will have more ways in the future aka BXE-NG).
> This means, you write the node-name, you want to edit as above with the
> attribute contentEditable="true", then you do for-each over exactly this
> node and apply-templates for every subnote. This is it. The XPath query
> in xsl:for-each can of course be more complex than it's here, but you
> have to take care, that the node name with the contentEditable attribute
> matches the nodenames, which are selected in the for-each. (It doesn't
> need to be this way, but if you play around with it and see for
> yourself, that it will have problems if you for example replace the
> select with select="article/*", this will improve in BXE-NG, hopefully )
> 
> For the 2 other needed files (Schema and CSS), you have to wait until my
> next mail, which should come in a few hours. I have some other stuff to
> do for the moment, but I don't want to let you wait anymore for the
> example files. Maybe they are of help for some out there ;)
> 
> 'till later
> 
> chregu
> 
> 


-- 
bx-editor-dev mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev