Home Forums General XMetaL Discussion Inserting Element Reply To: Inserting Element


Reply to: Inserting Element


Above solution is working if and only if the element can be inserted into the current insertion point , i.e
If my DTD has structure
!ELEMENT para (top, middle , bottom) > and suppose i have to insert element bottom and my current insertion point is  betwwn top and middle i.e.test1
(this is my current range)
then according to canInsert api it throws false because as per the DTD bottom element can not be inserted at the current location
but my requirement is I have to check in entire para element whether  element bottom can
be inserted or not and if DTD allows bottom element to be inserted into para it should move to the
valid insertion point into para and insert there into the para element.

Could you please help me in determining how shall I go with it, finding whether particulr element can be inserted anywhere into the selected current node that element or not instead of that particular point.