1

I'd like to use XML entities to define text snippets shortcuts. But for that, I need to define DTD:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ruleset [
    <!ENTITY useCli SYSTEM "Define this setting using JBoss CLI or the web console.">
]>
<ruleset id="..."

But this doesn't work since XML tools complain about the ruleset element not being defined. So I tried

    <!ELEMENT ruleset ANY>

But then it wants the child elements, attributes etc.

Is there a way to define a XML entity without defining the whole DTD? (There is a XSD schema for that document.)

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
  • You cannot define entities without a DTD. Some XML tools allow processing in non-validating mode where they expand entities without trying to validate the document. – mzjn Aug 07 '15 at 07:46

1 Answers1

-1

XSD is an alternative to DTD. If you have an XSD you shouldn't need a DTD.

See this answer for how to convert XSD to DTD: Free XSD to DTD conversion utility?

Tea Curran
  • 2,923
  • 2
  • 18
  • 22