MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Oxygen general issues.
FrankDLT
Posts: 18
Joined: Tue Jul 12, 2022 10:17 pm

MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by FrankDLT »

Hello, good day.
I'm currently writing a file where I need to input multiple values for a product attribute, something that I have seen done multiple times, however I keep receiving the error:
"Attribute "product" with value "product1 product2" must have a value from the list "product1 product2 product3 (...) "."
At first I thought it was a schema problem, but after looking into the files, I found that the error comes from a Resourses.jar file located under Oxygen\jre\lib.

The error has the id "MSG_ATTRIBUTE_VALUE_NOT_IN_LIST" in that file, and I have not been able to find a solution.

This is what I'm writing:

Code: Select all

 <body>
        <p product="product1 product2">Test</p>
        <image href="graphics/epm_plugin_workspace.jpg" id="imgjpgid"
            placement="inline" scalefit="yes">
            <alt>Oxygen Workspace</alt>
        </image>
        <p>Many of the same commonly-used functions are also available via the right-click
                menu:<image href="graphics/epm_plugin_right_click.jpg"
                id="imgId" placement="inline" scalefit="yes">
                <alt>Right-click menu</alt>
            </image></p>
    </body>
I have also tried adding a Custom profiling attribute, but its does not seem to work.
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by Radu »

Hi,

So you are editing a DITA XML file, right?
I think this looks like a schema validation error, reported by Oxygen after validating the XML file with its associated DTD/Schema.
Are you using a custom DITA specialization DTD or schema with your DITA topics?
So the "MSG_ATTRIBUTE_VALUE_NOT_IN_LIST" you found is a message key and is used by the validation processor when the attribute value in the XML file does not adhere to the DTD/XML Schema associated to the XML document.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
FrankDLT
Posts: 18
Joined: Tue Jul 12, 2022 10:17 pm

Re: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by FrankDLT »

Hello Radu, thanks for the response
Yes I'm editing a xml file.
I searched in all the different schemas, both default and custom, but there is no rule that may be being broken and none of them mention the error shown.

Regards,
Frank
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by Radu »

Hi Frank,

Can you answer this previous question I asked?
Are you using a custom DITA specialization DTD or schema with your DITA topics?
Also can you open the topic, use the "Validate" toolbar button to validate it, then in the "Problems" list right click on the error, choose "Copy" then paste it in a followup message on this thread? Maybe the problem details will tell me more about where it originates from.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
FrankDLT
Posts: 18
Joined: Tue Jul 12, 2022 10:17 pm

Re: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by FrankDLT »

Hi Radu
Should this work for multi profiling for dita Ot 1.8.5:
<p product="Acc_Rec_Cloud EPCM">Test</p>
The error message that we found comes from a Jar file that seems to come with the normal installation of Oxygen, that is why we reach out.
This is the location of the file that has the string of the error:
C:\oxygen\jre\lib\resources.jar
Does Oxygen ship with its own custom jre?
Yes we have a custom schematron, but the error its not in it, it appears to be a Xerces error.
We also use have a custom DTD, but could not find anything that seems related to the error in it.

Thanks a lot for the responses and all the help!
Regards,
Frank
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by Radu »

Hi Frank,

It would have helped me if you performed this step I previously mentioned:
Also can you open the topic, use the "Validate" toolbar button to validate it, then in the "Problems" list right click on the error, choose "Copy" then paste it in a followup message on this thread? Maybe the problem details will tell me more about where it originates from.
About this remark:

Code: Select all

The error message that we found comes from a Jar file that seems to come with the normal installation of Oxygen, that is why we reach out.
This is the location of the file that has the string of the error:
C:\oxygen\jre\lib\resources.jar
Does Oxygen ship with its own custom jre?
Yes we have a custom schematron, but the error its not in it, it appears to be a Xerces error.
Indeed this is a Xerces error. Xerces is an XML parser which also reports errors if the XML does not adhere to the DTD/XML Schema used to validate it.
Oxygen's bundled Java VM (in the "jre" subfolder) contains a Xerces installation. Oxygen does not use that Xerces installation, instead it uses its own "OXYGEN_INSTALL_DIR\lib\oxygen-patched-xerces.jar" library.
But no matter where the used Xerces parser is, it reports this error message because the "DTD/XML Schema" prohibits multiple values to be used on that particular XML element for the attribute "product", this is not a fault of the parser, it's the way in which the DTD/Schema associated to the XML document is constructed.

About this other remark:

Code: Select all

Should this work for multi profiling for dita Ot 1.8.5:
<p product="Acc_Rec_Cloud EPCM">Test</p>
With Oxygen 24.1 I just downloaded DITA OT 1.8.5, added it as a default used DITA OT in the Oxygen "Preferences->DITA" page and validated a DITA topic containing

Code: Select all

<p product="Acc_Rec_Cloud EPCM">Test</p>
Validation works for me, it reports no error. Is it possible you have an extra plugin installed in the DITA OT 1.8 containing a DTD specialization.

If you want to debug this further on your side, you can open the DITA topic containing the content:

Code: Select all

<p product="Acc_Rec_Cloud EPCM">Test</p>
Switch the opened DITA topic to the "Text" editing mode so that the entirely XML content is visible, click directly on the "product" attribute, right click and choose "Go to definition", Oxygen should open for you the DTD or XML Schema where that attribute is defined. On my side, using DITA OT 1.8 Oxygen opens for me this file "DITA-OT1.8.5/dtd/base/dtd/commonElements.mod" at line 799 . Does Oxygen on your side open for you the same module file? If not, you may have a custom DITA specialization DTD plugin installed in the DITA OT which imposed various limitations on attribute values.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
FrankDLT
Posts: 18
Joined: Tue Jul 12, 2022 10:17 pm

Re: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by FrankDLT »

Hi Radu, good day.
Sorry for missing the message itself, i forgot to include it in the last post, this is the message:
"System ID: <FILE>
Main validation file: <FILE>
Scenario name: DITA
Schema: ...\dita\DITA-OT1.8.5\plugins\com.epm.dita\epm-oxygen-dita-framework\EpmDITA\doctypes\epmTopic\epmTopic.dtd
Document type: epmDITA
Engine name: Xerces
Severity: error
Problem ID: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST
Description: Attribute "product" with value "Acc_Rec_Cloud EPCM" must have a value from the list "<product list is shown here>".

Start location: 6:20
End location: 6:40
"


As for the mod, it is indeed using the commonElements.mod file, and using the definition of the product I get redirected to the line 799. However I also noticed that when double clicking the error, the schema listed is a custom dtd, so I tried to modfy the dtd to allow a product attribute of p to able to have multiple attributes like this:

<!ENTITY % p.attributes
"%univ-atts;
outputclass
CDATA
#IMPLIED"
>
<!ATTLIST p %p.attributes; product (Acc_Rec_Cloud | EPCM | FreeForm | PBCS) #IMPLIED>

I also included the code snipped in the commonElements.mod, but this did not change anything.
This custom dtd does not mention the product attribute limitation either, outside of the change that i just made, the file never references the product attribute at all.
Regards,
Frank
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: MSG_ATTRIBUTE_VALUE_NOT_IN_LIST

Post by Radu »

Hi Frank,

If you can share the folder "DITA-OT1.8.5\plugins\com.epm.dita" with us (zip it and send it to "support@oxygenxml.com") I could try to look into this, otherwise I do not have enough details about how your DTD specialization is constructed.
As a hint, you should search for this:

Code: Select all

<!ENTITY % filter-atts
in all the DTDs from your "com.epm.dita" plugin, this entity should define all profiling attributes and possibly maybe also impose some values for certain ones.

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