Hi again,

I'm getting nervously close to my deadline, and need help with a
specific problem I'm having. Basically, I've got a DTD in which I've
got (amongst other things) ;

   <!ELEMENT section (title|picture|item|point|link)* >

My CSS has got this (for testing purposes) ;

  section:after {
   display:inline;
   content: insert-before-button() " " insert-button() " "
insert-after-button() " " ;
  }

If my XML template looks like this;

   <section> </section>

I can click the middle icon-button and all elements of the DTD comes
up as options. However, if I do;

   <section> 
      <point> ... text ... </point>
   </section>

then the middle icon-button yields nothing; I can't add more than one
element! (See below for the "empty element OR caret position" problem)
It does not matter which element it is; unless <section> is empty, I
can't add anything. (The before- and after- buttons work fine,
correctly stating I can add a section before and after this section.

I did one experiment where I also add #PCDATA to the <section> ;

   <!ELEMENT section (#PCDATA|title|picture|item|point|link)* >

and if I put the caret at the beginning, then I can add stuff. So, I
can write a macro as such ;

   <macro><sequence>
        <command name="selectNode" parameter="self[implicitElement]" />
        <command name="insert" parameter="into link" />
   </sequence></macro>

Now, the manual states that an 'insert into' must be either an empty
selected element OR at caret position. Why must an element be empty?
Is there no way to insert into a given position, such as "into/last()
element"? I already have the context node selected, so adding to the
beginning, position() or end should be trivial. This basically means
that what I'm trying to do is impossible, no? I'm trying to add
several elements to a <section> in a controlled way without having
#PCDATA in that element.

Any help or pointers in this matter would be very appreciated.

Thanks again,


Alexander
-- 
"Ultimately, all things are known because you want to believe you know."
                                                         - Frank Herbert
__ http://shelter.nu/ __________________________________________________

Reply via email to