Hello Hussein,

The attribute Entity_x appeared in my Docbook, thank you sincerely 😊.

I only have one question left, I am trying to use conditional processing but it 
doesn’t seem to be working with the new attributes I made.

Am I missing something to use my new attribute for conditional processing?

Kind regards, Alex

-----Original Message-----
From: Hussein Shafie <huss...@xmlmind.com> 
Sent: 03 November 2022 15:12
To: Hurd, Alex <alex.h...@nlr.nl>
Cc: 'xmleditor-support@xmlmind.com' <xmleditor-support@xmlmind.com>
Subject: Re: FW: [XXE] Question regarding the attribute editor

Think secure. This email is from an external source. Be careful when opening 
links and attachments!

Hello,

What you did is correct:
---
   <attributeEditor attribute="Entity_x" elementMatches="*">
     <list allowAnyValue="false" allowMultipleValues="false">
       <item>Yes</item>
     </list>
   </attributeEditor>
---
except that DocBook v5.1 has no "Entity_x" attribute. That's why your 
attributeEditor is never used.



--> What to do:

1) Remove your attributeEditor from docbook51.xxe as this attributeEditor is 
really not needed for such a simple case.

2) Modify docbook51/rng/V5.1/docbook.rng by defining attribute "Entity_x" and 
adding it to the group of common base attributes
"db.common.base.attributes":

Original schema:
---
    <define name="db.common.base.attributes">
       <interleave>
          <optional>
             <ref name="db.version.attribute"/>
          </optional>
          <optional>
             <ref name="db.xml.lang.attribute"/>
          </optional>
          <optional>
             <ref name="db.xml.base.attribute"/>
          </optional>
          <optional>
             <ref name="db.remap.attribute"/>
          </optional>
          <optional>
             <ref name="db.xreflabel.attribute"/>
          </optional>
          <optional>
             <ref name="db.revisionflag.attribute"/>
          </optional>
          <optional>
             <ref name="db.dir.attribute"/>
          </optional>
          <ref name="db.effectivity.attributes"/>
          <ref name="db.rdfalite.attributes"/>
          <ref name="db.transclusion.attributes"/>
       </interleave>
    </define>
  ---

Modified schema:
---
    <define name="db.common.base.attributes">
       <interleave>
          <optional>
             <ref name="db.version.attribute"/>
          </optional>
          <optional>
             <ref name="db.xml.lang.attribute"/>
          </optional>
          <optional>
             <ref name="db.xml.base.attribute"/>
          </optional>
          <optional>
             <ref name="db.remap.attribute"/>
          </optional>
          <optional>
             <ref name="db.xreflabel.attribute"/>
          </optional>
          <optional>
             <ref name="db.revisionflag.attribute"/>
          </optional>
          <optional>
             <ref name="db.dir.attribute"/>
          </optional>
          <ref name="db.effectivity.attributes"/>
          <ref name="db.rdfalite.attributes"/>
          <ref name="db.transclusion.attributes"/>
          <optional>
             <ref name="entity.x.attribute"/>
          </optional>
       </interleave>
    </define>
    <define name="entity.x.attribute">
      <attribute name="Entity_x">
        <value>Yes</value>
       </attribute>
    </define>
---

(There is a "cleaner" way to customize the DocBook v5.1 schema by augmenting 
"db.common.base.attributes". See
https://relaxng.org/tutorial-20011203.html#IDAVEZR)

Modified schema is attached to this email, as well as a screenshot of XMLmind 
XML Editor Attributes tool.

Best regards,


On 11/3/22 13:36, Hurd, Alex wrote:
> Dear Hussein,
>
> I have had a look into your comments. I checked as you suggested and i am 
> currently working in a Docbook V5.1 (see attachment).I apologize beforehand I 
> have grayed out the name of the file and location due to client requirements.
>
> I have also attached a copy of the "docbook51.xxe" with the adjustment I 
> made. I want to add an attribute of with the given name, and currently only 
> want that attribute to have the value " yes" when used. I don’t know if this 
> is possible or not but I am currently running into trouble even getting 
> changes to appear in the Docbook when editing the config file. Could you have 
> a look into this?
>
> Thank you very much and kind regards,
>
> Alex Hurd
>



--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to