
When opening a file. Why does the editor need to Learn the document if it has a DOCTYPE decl? Sean Wheller __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/

Sometimes the DTD is hard to load. It may by very large for example. In order to offer code completion from the start of the editing, the editor is learning the structure just after open. As a side effect, documents that do not specify a DTD can be edited with the code completion feature. Dan Caprioara Sean Wheller wrote:
When opening a file. Why does the editor need to Learn the document if it has a DOCTYPE decl?
Sean Wheller
__________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Thanks Dan. This stratergy assumes that the document structure is correct or valid against the sepecified DTD. If an invalid document is loaded the learned structure will not be correct. At what point does the code insight revert to using the DTD spec in the decl or when no DTD is specified the Tag Insight > Default? I ask this because I find that in some cases the insight is not showing me tags that should be available in context of the DTD structure. When I validate insight reverts showing the missing element. It seems to happen mostly on block elements and when in a list like orderedlist or variablelist. Sean Wheller --- Dan Caprioara <dan@oxygenxml.com> wrote:
Sometimes the DTD is hard to load. It may by very large for example. In order to offer code completion from the start of the editing, the editor is learning the structure just after open. As a side effect, documents that do not specify a DTD can be edited with the code completion feature.
Dan Caprioara
Sean Wheller wrote:
When opening a file. Why does the editor need to Learn the document if it has a DOCTYPE decl?
Sean Wheller
__________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com
http://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com
http://www.oxygenxml.com/mailman/listinfo/oxygen-user __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/

Hi Sean,
Thanks Dan.
This stratergy assumes that the document structure is correct or valid against the sepecified DTD. If an invalid document is loaded the learned structure will not be correct.
The schema detection is started after learning. This way, at the moment the schema is parsed, the code completion will offer content based on the schema, and it will forget the learned structures.
At what point does the code insight revert to using the DTD spec in the decl or when no DTD is specified the Tag Insight > Default?
The schema detection is responsible for this. At opening the following steps are performed: 1. The document is learned. 2. The schema detector is started. 3. If the schema detector has detected a DTD in the doc, or has found a DTD specified in the options, it will use it, replacing the learned structures.
I ask this because I find that in some cases the insight is not showing me tags that should be available in context of the DTD structure. When I validate insight reverts showing the missing element.
Probably the time between learning and schema parsing was longer. If this happens again, please let me know. Cheers, Dan
participants (2)
-
Dan Caprioara
-
Sean Wheller