Next in thread → Next in month →

Re: [xml-dev] Taking a cue from Microsoft Word

From
George Cristian Bina <>
To
"Simon St.Laurent" <>, "" <>
Date
2013-12-08T07:07:51Z
ID
<>
Thread
Re: [xml-dev] Taking a cue from Microsoft Word
Hi Simon,

Actually we have something like a flexible schema that works for content 
completion but not immediately for validation. We added this in one of 
the first versions of oXygen, more than 10 years ago :).

If you use the "Learn document structure" action (CTRL+Shift+L / 
CMD+Shift+L on Mac) then oXygen will automatically infer a DTD from the 
document structure and will use that information to offer content 
completion proposals. When you add a new element you can use the action 
again to learn the new document structure.

The validate action does not use this inferred DTD, unfortunately, but 
it is possible to save this structure with Document->XML Document-> Save 
Structure (you can associate your desired shortcut for this action) and 
then a DTD will be saved and a DOCTYPE declaration will be added to the 
document pointing to that DTD.

After this, you can switch the content completion between the DTD and 
the actual structure using the Validate and the Learn document structure 
actions. After you Validate the document (CTRL+Shift+V / CMD+Shift+V) 
the content completion will switch to use the DTD (or the schema) and 
then you can use Learn document structure to switch back to the document 
structure.

To update the saved DTD after you added a new element you can save the 
structure again overwriting the previously saved DTD.

I think that if we will automatically use the inferred structure also 
for validation without the need to save it as a DTD then that will be 
very close, if not exactly, the flexible schema that you want.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 12/8/13, 1:12 AM, Simon St.Laurent wrote:
> On 12/7/13 5:24 PM, George Cristian Bina wrote:
>> I am not sure about the first case... in general when someone creates
>> a document the schema is not under development at that point or that
>> user has no authority to change the schema.
> I think what Roger proposed was pretty much exactly that - allowing
> flexible schemas that can be changed during editing of documents.
>
> That's what I liked about it, anyway!
>
>> There is also no intermediate level, like a local dictionary, where
>> you can add local, user specific element definitions.
>
> That's an interesting idea too.
>
> Thanks,
Next in thread → Next in month →