Page 1 of 1

Insert xml element with text value

Posted: Tue Dec 19, 2023 8:25 pm
by Isabelle
Hello,

We use oxygen sdk 25.0.0.0.

We have this element in the xsd :

Code: Select all

<xs:complexType mixed="true" name="simplePara">
        <xs:attribute ref="id"/>
    </xs:complexType>
We want to set the element value to FULL when element is inserted.

I tried to use the content completion configuration file with this value :

Code: Select all

  <valueProposals path="/exportRegistrationStmt/simplePara">
    <items>
      <item value="full"/>
    </items>
  </valueProposals>
But it does not work.

Is there an equivalent of

Code: Select all

  <elementProposals path="exportRegistrationStmt" insertElements="simplePara">
    <insertAttribute name="exportRole" value="full"/>
  </elementProposals>
If no, how can I add text value to simplePara element when inserted.

Thanks,
Regards,
Isabelle

Re: Insert xml element with text value

Posted: Wed Dec 20, 2023 10:14 am
by Radu
Hi Isabelle,
We have an issue registered for imposing text element values using cc_config, I added your details to it and if it will get resolved in the future we will notify you on this thread. Pasting the issue ID for future reference:
EXM-47033 Impose default text value via the cc_config.xml
For now you will need to find other means to do this, maybe with a custom AuthorDocumentFilter implementation or by replacing the element in the content completion window with a custom action:
https://blog.oxygenxml.com/topics/custo ... etion.html
Regards,
Radu

Re: Insert xml element with text value

Posted: Thu Oct 03, 2024 7:56 pm
by Isabelle
Hello Radu,
Can we have a status on this issue ?
Thanks,
Regards.
Isabelle

Re: Insert xml element with text value

Posted: Fri Oct 04, 2024 6:49 am
by Radu
Hi Isabelle,
Internal issue with ID EXM-47033 is in the opened stage, I'm afraid we have not had time to implement it. If we implement it in a future version we will let you know.
Regards,
Radu