Cannot add custom profiling attribute
Posted: Mon May 29, 2023 7:00 am
I want to add a custom profiling attribute called "deployment", and it has values like standy、ha、cluster.
It‘s not defined by DITA,so I must modify the DTD file.
I added some definitions in task.dtd (I don’t know where to add it better), and imitate like the deliveryTargetAtt:
And then I added a deploymentAttDomain.ent, which contains the code below:
However, when I try to add this attribute in Oxygen Editor, for example, "select <uicontrol deployment="ha">Settings</uicontrol>", it warned like this :Attribute "deployment" is not allowed to appear in element "uicontrol".
It seems that the new attribute does not work. So is there anything wrong when modifying the DTD?
It‘s not defined by DITA,so I must modify the DTD file.
I added some definitions in task.dtd (I don’t know where to add it better), and imitate like the deliveryTargetAtt:
Code: Select all
<!-- ============================================================= -->
<!-- DOMAIN ATTRIBUTES DECLARATIONS -->
<!-- ============================================================= -->
<!ENTITY % deliveryTargetAtt-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.3 Delivery Target Attribute Domain//EN"
"../../base/dtd/deliveryTargetAttDomain.ent"
>%deliveryTargetAtt-d-dec;
<!ENTITY % deploymentAtt-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.3 Deployment Attribute Domain//EN"
"../../base/dtd/deploymentAttDomain.ent"
>%deploymentAtt-d-dec;
<!-- ============================================================= -->
<!-- DOMAIN ATTRIBUTE EXTENSIONS -->
<!-- ============================================================= -->
<!ENTITY % props-attribute-extensions
"%deliveryTargetAtt-d-attribute;"
>
<!ENTITY % base-attribute-extensions
""
>
<!ENTITY % props-attribute-extensions
"%deploymentAtt-d-attribute;"
>
<!-- ============================================================= -->
<!-- DOMAINS ATTRIBUTE OVERRIDE -->
<!-- ============================================================= -->
<!ENTITY included-domains
"&task-att;
&abbrev-d-att;
&deliveryTargetAtt-d-att;
&equation-d-att;
&hazard-d-att;
&hi-d-att;
&indexing-d-att;
&markup-d-att;
&mathml-d-att;
&pr-d-att;
&relmgmt-d-att;
&sw-d-att;
&svg-d-att;
&ui-d-att;
&ut-d-att;
&xml-d-att;
&taskbody-constraints;
&deploymentAtt-d-att;
"
>
And then I added a deploymentAttDomain.ent, which contains the code below:
Code: Select all
<!ENTITY % deploymentAtt-d-attribute
"deployment
CDATA
#IMPLIED"
>
<!-- ============================================================= -->
<!-- DOMAIN ENTITY DECLARATION -->
<!-- ============================================================= -->
<!ENTITY deploymentAtt-d-att
"a(props deployment)"
>
However, when I try to add this attribute in Oxygen Editor, for example, "select <uicontrol deployment="ha">Settings</uicontrol>", it warned like this :Attribute "deployment" is not allowed to appear in element "uicontrol".
It seems that the new attribute does not work. So is there anything wrong when modifying the DTD?