On 01/23/2012 10:40 PM, Harris, Susan wrote:
> Thanks, Hussein.
>
> One issue was cleared up by removing selectable="override" from all<para>  
> elementTemplates (except the one without a role).  This cleared up the 
> insertion of paras under a regular<section>  using the editPane on the right 
> hand side.  The results are consistent/expected now under<section>  without 
> role attribute, for Enter, "p" button, and right hand menu.
>
> I have also changed insertNewPara to clg.insertNewPara everywhere.  I 
> searched for this insertNewPara  command, and found only one instance of it 
> throughout all of our *.incl and *.xxe files to change.
>
>
> We are still working on trying to make the<para>s consistent under 
> the<section role='personal'>  section.  We still have the<para 
> role="valueaboveit">  inserting under this section when Enter is hit, 
> and<para>  now inserts whenever "p" button or right hand menu para (listed 
> from the schema) is hit.
>
> If you have any additional suggestions for this last issue, that would be 
> greatly appreciated.
>

I'm sorry but I really don't see.


> Thanks for your continued help,
>
> Susan
>
> -----Original Message-----
> From: Hussein Shafie [mailto:[email protected]]
> Sent: Friday, January 20, 2012 5:16 AM
> To: Harris, Susan
> Cc: [email protected]
> Subject: Re: [XXE] CSS2 and XML Mind(?) does not allow for choosing a<para>  
> with no attribute in the CSS file [FIX: REPLACED<p>  BY<para>]
>
> On 01/19/2012 11:11 PM, Harris, Susan wrote:
>> In our CSS file, we have the following para entries, with and without a
>> "role" attribute:
>> In our xxe configuration file, we have the following matching entries:
>> The ENTER command works perfectly: it inserts a special<para
>> role="somevalue">  into the form when the cursor is under a<section
>> role="personal">  tag, or, it simply inserts a<para>  under a<section>  tag.
>
> This is *not* what I see when I read macro insertNewPara. This macro
> cannot insert a<para>  having a role attribute.
>
> This seems obvious as it contains<command name="removeAttribute"
> parameter="role" />  just after the<command name="insert"
> parameter="after[implicitElement]
> {http://www.xml.cengage-learning-gale.com/docbook-core}para"; />
>
>
>
>> What I would like to do is make the "p" button on our custom tool bar
>> and the editPane (on the right side of the editor, when para shows up in
>> the list of elements to insert) to behave in the same way as the ENTER
>> button.
>> Currently the "p" button inserts a<para>  under both types of section
>> tags,
>
> That's normal according to macro insertNewPara.
>
> The ENTER key binding should do exactly the same. I have no idea why you
> say the ENTER key binding works ``perfectly'' given the macro
> insertNewPara that you have attached to this email.
>
>
>
>   >  and, the editPane inserts a (<para role="somevalue">  under both
>> types of section tags.
>
> That's almost certainly normal, because I suspect that you have this
> kind of element template specified somewhere:
>
> ---
> <elementTemplate name="WithRole" selectable="override">
>     <para role="somevalue"
>      xmlns="http://www.xml.cengage-learning-gale.com/docbook-core";></para>
> </elementTemplate>
> ---
>
> The selectable="override" makes it the default template for element
> <para>. See
> http://www.xmlmind.com/xmleditor/_distrib/doc/configure/elementTemplate.html
>
>
>
>> The "p" button is especially puzzling since it is
>> pointing (see below) to the same insertNewPara command (defined below)
>
> No, it's not puzzling. The insertNewPara macro found below and also in
> "XXE - xxe file entries.docx" adds a<para>  *without* a role attribute.
>
>
>
> -->  I have no idea why you say the ENTER key binding works ``perfectly''
> given the macro insertNewPara that you have attached to this email.
>
> *May* *be* you have several configurations which define macro
> insertNewPara. As commands and macros are global and not scoped by their
> configurations, the last loaded configuration is the one which rules.
>
> For example, open documentA associated to configurationA which defines
> insertNewPara. XXE uses this instance of insertNewPara. Now, later in
> the same editing session, open documentB associated to configurationB
> which defines a different insertNewPara. Let's call it insertNewPara'.
>   From now, XXE uses insertNewPara' and this even for documentA.
>
>
>
>
> [[[It's recommended to always prefix command and macro names by a short
> string which is specific to their configuration. For example:
>
> ---
>     <command name="db5.convertWithAttribute">
>       <macro repeatable="true" undoable="true" label="Convert">
>         <sequence>
>           <choice>
>       <command name="selectNode"
>                      parameter="self[implicitElement] %0" />
>       <command name="convert"
>                      parameter="[implicitElement] %0" />
>           </choice>
>           <command name="putAttribute" parameter="%1 %2" />
>         </sequence>
>       </macro>
>     </command>
> ---
> Notice the "db5." prefix which means specific to "DocBook v5+".]]]
>
>
>
>> within an include file that is included in the xxe config file:
>> In xxe file:
>> <includelocation="company.incl"/>
>> <binding>
>> <keyPressedcode="ENTER"/>
>> <commandname="insertNewPara"/>
>> </binding>
>> <commandname="insertNewPara">
>> <macro>
>> <sequence>
>> <commandname="insert"parameter="after[implicitElement]
>> {http://www.xml.cengage-learning-gale.com/docbook-core}para"/>
>> <commandname="removeAttribute"parameter="role"/>
>> <sequence>
>> <pass><commandname="selectNode"parameter="ancestor[implicitElement]
>> {http://www.xml.cengage-learning-gale.com/docbook-core}section"/></pass>
>> <commandname="cancelSelection"/>
>> </sequence>
>> </sequence>
>> </macro>
>> </command>
>> In company.incl file:
>> <buttontoolTip="Add para"icon="../config/common/icons/paragraph.png">
>> <commandname="insertNewPara"/>
>> <!--defined in cengage.xxe -->
>> </button>
>> The last entry in the xxe file above is not being called. It was written
>> in hopes that it could be called in some way from the CSS file, since
>> the addition of the role attribute entries in the CSS and xxe files
>> somehow overwrites the default<para>  formatting:
>> <commandname="insertNoRolePara">
>> <macroundoable="false">
>> <sequence>
>> <commandname="insert"parameter="after[implicitElement]
>> {http://www.xml.cengage-learning-gale.com/docbook-core}para"/>
>> <commandname="cancelSelection"/>
>> </sequence>
>> </macro>
>> </command>
>> Is there a way to either enter a para[not(role)] entry in the CSS file,
>> where all non-role paras (<para>) can be funneled to the
>> insertNoRolePara command, or, enter a default<para>  format in the xxe
>> file, so that it does not randomly pick one of the para role (<para
>> role="somevalue">) formats at random to insert into the Editor form (as
>> it is doing now when an insert is done)? (I am hoping that there is one
>> solution that fixes both the custom "p" button and the editPane
>> insertion of para on the right hand side of the editor.)
>
> --
> XMLmind XML Editor Support List
> [email protected]
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support
>
>

 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to