Trind
Trind

Reputation: 1599

XML entity from other file if one file doesn't exist

we have the following, but sometime the file doesn't exist

    <!ENTITY my SYSTEM "/etc/forms/X-SE.xml">

and if the file /etc/forms/X-SE.xml doesn't exist we would like to do the following:

    <!ENTITY my SYSTEM "X-SE.xml">

Is that possible ?

Upvotes: 1

Views: 57

Answers (1)

kjhughes
kjhughes

Reputation: 111716

No, there is no provision at the XML level for specifying a fallback system entity for a missing system entity.

Instead, you might intervene at the parser level by writing a custom entity resolver or at the HTTP protocol level via code to conditionally redirect.

Upvotes: 1

Related Questions