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

Support for inline XML DTD #734

Closed
sebastiannoell opened this issue Nov 1, 2023 · 1 comment
Closed

Support for inline XML DTD #734

sebastiannoell opened this issue Nov 1, 2023 · 1 comment

Comments

@sebastiannoell
Copy link

Hey there! 👋

I have a valid xml with a DTD defined like this:

<!-- demo.xml -->
 <!DOCTYPE example [
  <!ELEMENT example (item)*>
  <!ELEMENT item (name, price)>
  <!ELEMENT name (#PCDATA)>
  <!ELEMENT price (#PCDATA)>
]>
<example>
  <item>
    <name>Item 1</name>
    <price>$10.00</price>
  </item>
  <item>
    <name>Item 2</name>
    <price>$20.00</price>
  </item>
</example>

Versions:

"@prettier/plugin-xml": "^3.2.2",
"prettier": "^3.0.3"

When checking, I am getting this error:

image

Sadly, wrapping this in an ignore comment block as described in the README.md, the error still persists.

also see: https://www.w3schools.com/xml/xml_dtd.asp

Thanks in advance, Seb :)

@kddnewton
Copy link
Member

Thanks @sebastiannoell! Unfortunately the parser is crashing on this and there's not much we can do about it until the parser supports it. I've upstreamed the request here: SAP/xml-tools#450. I'll close this for now and track it over there.

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

No branches or pull requests

2 participants