QuickFix doesn't resolve substitution groups for missing ele
Posted: Thu May 28, 2015 10:53 am
Hi,
in my xml schema I'm using substitution groups, for instance "StandardSectionElement" which itself is an abstract element but p, ul, sl, ...are added to it as substitution elements. A section should contain at least a single StandardSectionElement after the title.
Now for a section with only a title there is a QuickFix generated that suggests to insert "StandardSectionElement". After executing this QuickFix I get - of course - this error message: "The value of {abstract} in the element declaration for 'StandardSectionElement' must be false". So it seems you don't resolve substitution groups when identifying the possible elements yet.
Actually I don't want the section content to be declared mandatory (I just wanted to check oxygens behavior), because I prefer that the document stays schema-valid while the user edits it. Thus, I only implemented a schematron check for this. But now I'd like to provide QuickFixes to insert any of the allowed elements. Since this information is present in the schema and you already use it to generate QuickFixes for mandatory elements, I'm wondering if I can access such a method as well!? (I have plenty other cases of choices without substitution groups, so the current implementation would lready help.)
Thanks and regards,
Patrik
in my xml schema I'm using substitution groups, for instance "StandardSectionElement" which itself is an abstract element but p, ul, sl, ...are added to it as substitution elements. A section should contain at least a single StandardSectionElement after the title.
Now for a section with only a title there is a QuickFix generated that suggests to insert "StandardSectionElement". After executing this QuickFix I get - of course - this error message: "The value of {abstract} in the element declaration for 'StandardSectionElement' must be false". So it seems you don't resolve substitution groups when identifying the possible elements yet.
Actually I don't want the section content to be declared mandatory (I just wanted to check oxygens behavior), because I prefer that the document stays schema-valid while the user edits it. Thus, I only implemented a schematron check for this. But now I'd like to provide QuickFixes to insert any of the allowed elements. Since this information is present in the schema and you already use it to generate QuickFixes for mandatory elements, I'm wondering if I can access such a method as well!? (I have plenty other cases of choices without substitution groups, so the current implementation would lready help.)
Thanks and regards,
Patrik