Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change "NDAttributes.xsd" to support .xml containing macro characters, $, (, ) #512

Open
cpchuang opened this issue Sep 18, 2024 · 3 comments · May be fixed by #522
Open

change "NDAttributes.xsd" to support .xml containing macro characters, $, (, ) #512

cpchuang opened this issue Sep 18, 2024 · 3 comments · May be fixed by #522
Assignees

Comments

@cpchuang
Copy link

current "NDAttributes.xsd" invalidate .xml files containing $, (, )

Validating xml file against "./XML_schema/NDAttributes.xsd"
Attri_ADsim.xml:9: element Attribute: Schemas validity error : Element 'Attribute', attribute 'source': '$(P)cam1:Manufacturer_RBV' is not a valid value of the union type 'type_source'.

After discussing with @prjemian , propose the following changes to include $, (, ),

    <xs:restriction base="xs:string"> <!-- Changed from xs:NMTOKEN to xs:string -->
      <xs:pattern value="[\w_\-:.;\$\(\)]+([.][A-Z0-9]+)?"/>   <!-- include $, (, ),  -->
    </xs:restriction>
  </xs:simpleType>
@cpchuang
Copy link
Author

for clarity,
Here is the example attributes.xml
image

and how macro is added in AD.
image

@MarkRivers
Copy link
Member

Can you please submit a PR for this?

@prjemian prjemian self-assigned this Dec 20, 2024
@prjemian
Copy link
Contributor

I will look into this shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants