Issue with auto completion function

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 74
Joined: Fri Jan 20, 2017 1:11 pm

Issue with auto completion function

Post by Isabelle » Mon Feb 22, 2021 11:05 am

In Oxygen XML Editor 21.1, when I use the widget Elements I have 2 different behavior with Text view and Author view.
I open this file

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE dmodule[]>

	<dmodule xmlns:dc="http://www.purl.org/dc/elements/1.1/"
		xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
		xmlns:xlink="http://www.w3.org/1999/xlink"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:noNamespaceSchemaLocation="http://www.s1000d.org/S1000D_4-1/xml_schema_flat/fault.xsd">
		<identAndStatusSection>
			<dmAddress>
				<dmIdent>
					<dmCode modelIdentCode="AAAAAAAAAA"
						systemDiffCode="BBB"
						systemCode="CC0"
						subSystemCode="0"
						subSubSystemCode="0"
						assyCode="00"
						disassyCode="00"
						disassyCodeVariant="DD"
						infoCode="000"
						infoCodeVariant="E"
						itemLocationCode="T"/>
					<language countryIsoCode="US" languageIsoCode="en"/>
					<issueInfo issueNumber="001" inWork="01"/>
				</dmIdent>
				<dmAddressItems>
					<issueDate year="2019" month="06" day="28"/>
					<dmTitle>
						<techName>Title</techName>
						<infoName>Name</infoName>
					</dmTitle>
				</dmAddressItems>
			</dmAddress>
			<dmStatus>
				<security securityClassification="01"/>
				<responsiblePartnerCompany></responsiblePartnerCompany>
				<originator></originator>
				<applic><displayText></displayText></applic>
				<brexDmRef>
					<dmRef>
						<dmRefIdent>
							<dmCode modelIdentCode="AAAAAAAAAA"
								systemDiffCode="BBB"
								systemCode="CC0"
								subSystemCode="0"
								subSubSystemCode="0"
								assyCode="00"
								disassyCode="00"
								disassyCodeVariant="DD"
								infoCode="000"
								infoCodeVariant="E"
								itemLocationCode="T"/>
						</dmRefIdent>
					</dmRef>
				</brexDmRef>
				<qualityAssurance><unverified/></qualityAssurance>
			</dmStatus>
		</identAndStatusSection>
		<content>
			<faultIsolation>
				<faultIsolationProcedure>
					<isolationProcedure>
						<preliminaryRqmts>
							<reqCondGroup/>
							<reqSupportEquips/>
							<reqSupplies/>
							<reqSpares/>
							<reqSafety/>
						</preliminaryRqmts>
						<isolationMainProcedure/>
						<closeRqmts>
							<reqCondGroup/>
						</closeRqmts>
					</isolationProcedure>
				</faultIsolationProcedure>
			</faultIsolation>
		</content>
	</dmodule>
When the cursor is between faultIsolationProcedure tag and isolationProcedure tag,
on Text view I have 3 possibilities : fault, possibleCauseGroup and isolationProcedure; And faultDescr in grey
on Author view I have 1 possibility : possibleCauseGroup; And fault, faultDescr, isolationProcedure in grey

The definition of the element faultIsolationProcedure in the xsd is :

Code: Select all

<xs:element name="faultIsolationProcedure" type="faultIsolationProcedureElemType"/>
	<xs:complexType name="faultIsolationProcedureElemType">
		<xs:sequence>
			<xs:sequence minOccurs="0">
				<xs:element ref="fault"/>
				<xs:element ref="faultDescr"/>
			</xs:sequence>
			<xs:element minOccurs="0" ref="possibleCauseGroup"/>
			<xs:element ref="isolationProcedure"/>
		</xs:sequence>
		<xs:attribute ref="applicRefId"/>
		<xs:attribute ref="id"/>
		<xs:attributeGroup ref="changeAttGroup"/>
		<xs:attributeGroup ref="securityAttGroup"/>
		<xs:attributeGroup ref="authorityAttGroup"/>
	</xs:complexType>
Can you tell me why there is 2 different behavior between this 2 view ?

Moreover, we tried to customize the automatic completion in our application.
We add this in our ContentCompletionConfigurator :

Code: Select all

<elementProposals insertElements="fault" path="faultIsolationProcedure"/>

In Author view, when we add faultIsolationProcedure, only isolationProcedure is inserted automaticaly.

For information it works fine with :

Code: Select all

<elementProposals insertElements="quantityGroup" path="quantity"/>

And we have the same behavior between Oxygen Editor and our application with the Elements widget.

We don't understand why there is this different behavior issue and why we can not add automatically fault instead of isolationProcedure.
Do you have any ideas ?

Regards,
Isabelle

Radu
Posts: 7405
Joined: Fri Jul 09, 2004 5:18 pm

Re: Issue with auto completion function

Post by Radu » Mon Feb 22, 2021 11:54 am

Hi Isabelle,

In Oxygen 23 we added to the Preferences->"Content Completion" page a new checkbox named "Consider subsequent sibling elements". This checkbox when enabled (default behavior) instructs Oxygen to look also at the elements already inserted when the content completion window is shown or when the Elements view computes the list of allowed elements.
For example in your case:

Code: Select all

<faultIsolationProcedure>
					<isolationProcedure>
if you want to insert content before "isolationProcedure" Oxygen 23 will propose "isolationProcedure" as faded out (because it's already present). And Oxygen 23 is consistent in this behavior both for the Text and for the Author mode.

Before Oxygen 23 for the Author mode we took into account the already inserted elements but for the Text editing mode we did not. We also did not have any checkbox to consistently control this.

So this is I think an explanation of why for you there is this difference between Text and Author modes.

About the other problem:

Code: Select all

<elementProposals insertElements="fault" path="faultIsolationProcedure"/>
from what I looked on our side, once insert elements are specified in the cc_config file, they will be used when the new element is inserted and Oxygen no longer looks in the schema for required elements. So in this case I would expect that when "faultIsolationProcedure" is inserted, the "fault" element is inserted along but the "isolationProcedure" is not inserted.
But we need some more details if you want a further investigation. Maybe you can contact us (support@oxygenxml.com) and provide a complete cc_config.xml file for which the problem can be reproduced.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Isabelle
Posts: 74
Joined: Fri Jan 20, 2017 1:11 pm

Re: Issue with auto completion function

Post by Isabelle » Wed Feb 24, 2021 12:07 pm

Hi Radu,

I have just send you an email with our cc_config.xml file.
I hope it will help you to reproduce our problem.
Thanks.

Regards,
Isabelle

Post Reply