[oXygen-user] bug report: repeated schema-declared element content

Syd Bauman
Mon Aug 24 16:27:48 CDT 2015


Thanks for the quick response and information, George and Radu. I had
not realized the process was so complex (although I am not
surprised). 

I'm wondering if it might be a lot easier to detect "this is
complicated" and just not perform autocompletion if it is.


RD> Is your schema an exercise or is it meant for a real situation?

Heh-heh. Not only is it a demonstration schema, it is a demonstration
of how NOT to write a schema. So not real at all.


GB> For performance reasons we use as context information for content 
GB> completion the path to the root, including attributes and eventual 
GB> previous sibling elements, including their attributes. In this case, the 
GB> context is like this:
GB> 
GB> 
GB> <poem>
GB>      <head>
GB>      <sonnet>
GB>          <pLine num="02">
GB>            ???
GB> 
GB> where ??? is the place we try to find what content is allowed by the schema.
GB> 
GB> We also use Jing, and in this case it seems it will give an error on the 
GB> num="02" attribute and it recovers ignoring that value, probably using 
GB> the first pLine pattern, so then when we look into what values are 
GB> available for that element, we get the value of the first line.
GB> 
GB> Usually the context information that we use is enough, but in some cases 
GB> that use co-occurrence constraints that is not enough and more context 
GB> information is needed, in some cases the entire document may be needed 
GB> to decide what to insert next in the document. Unfortunately in this 
GB> situation the context information we pass along is not enough and the 
GB> recovery that Jing does when we feed it with the context fragment gives 
GB> an unexpected value.
GB> 
GB> I cannot think of a true fix for this other than passing the entire 
GB> document content as content completion context. A simpler fix, that will 
GB> solve this specific situation, may be to extend the content completion 
GB> with previous siblings of the parent.


More information about the oXygen-user mailing list