On 04/04/2010 02:44 PM, Hussein Shafie wrote:
> nobili, philippe wrote:
>   
>> We have developed a small add-on in XMLMind to allow editing XML instances 
>> corresponding to a home defined XML schema. In this schema, the 
>> documentation elements can
>>  optionally be placeholder for strict XHTML body nodes. The whole thing is 
>> converted to DocBook using XSLT.
>>
>> Could you explain us how to allow the styled view defined for XHTML document 
>> type to be used when editing the content of these documentation nodes ? We 
>> think that this is used
>> in the XML schema add-on in XMMind, but did not understand exactly how it 
>> works...
>>
>>     
> This is pretty simple to do.
>
> --> Validation. Excerpts of wxs_config/wxs.xxe:
>   
<Skipped>

Dear Mr. Shafie,

Many thanks for your reply. We managed to get some results, but we still
have "minor" problems with what we did. We would appreciate any help,
although we understand that this is a little bit outside the strict
scope of XMLMind support...

Again, many thanks for your very efficient support,
Best regards,
Phil.

[PS: to reply one of your remark, we used XHTML here rather than
DocBook, because our XML file is supposed to contain very small chunks
of documentation that everybody should be able to edit easily. They are
turned into DocBook with the rest of the file by XSLT later-on...).


Basically, we have in our XML-schema two different ways to put some
documentation:

1. a simple element <help>
2. an extended help element <xhelp> which serves as a container for any
XHTML element from XHTML namespace. So far so good.

We proceeded as you explained in your mail, (excerpt):

We added  XHTML support + validation support:
<cfg:include location="xxe-config:xhtml/xhtml_support.incl" />
<cfg:validate........

We added a template for <xhelp> elements:

<cfg:elementTemplate name="xhelp" selectable="override">
    <xhelp xmlns="http://www.cggveritas.com/geovation/module/1.0";>
      <body  xmlns="http://www.w3.org/1999/xhtml";><p
xmlns="http://www.w3.org/1999/xhtml";></p></body>
    </xhelp>
  </cfg:elementTemplate>

Now,

We can edit the XHTML documentation online in the styled view, we get
the appropriate list of XHTML elements, they are rendered correctly, etc etc

But there are residual problems we fail to tackle; we would really
appreciate if you could help us with these...

+ There is no way to make XMLMind validates our documents, it complains
about any XHTML element we insert (error: cannot find a declaration for
child element xhtml:body).

    We added the <validate> instruction in our .xxe file, so we fail to
see what is wrong, especially because XMLMind lets us add the XHTML 
elements in the right places....

+ Some of the keyboard shortcuts used when authoring XHTML in the styled
view do not work (e.g. <Enter> to add new list items). We have to go
through the list of elements to add items.

+ The last one is minor; our structure is very simple:

   <desc>
     <help> | <xhelp>

   What we wish to do with the insertDocumentation is to make it available:
     when a <desc> element is selected, in which case it would take the
content of the <help> and replace the <help> element -- if any -- by
<xhelp><p> with the same content in the paragraph.

     At least we would like to be able to simply replace <help> by
<xhelp> with our template.

    So far, the command is available when it is supposed to, but does
nothing, so I guess we have it wrong...


<<attachment: philippe_nobili.vcf>>

 
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to