xslt - How to declare escape character as DTD Entities in external file and import in XML files -


in web project, have lot of xml files non-escaped characters. declare these characters dtd entities , include list of declaration internally in each xml file, so:

!doctype article system "../../pubmedref/archivearticle.dtd" [    <!entity bull "&#8226;">    <!entity copy "&#169;">    ... long list ... ]> 

is there way can have these declarations in external file , import in xml files? xml files rendered browser using xslt.

fwiw, i've tried referencing .ent file not work on of browsers.

normally use parameter entity...

xml file

<!doctype article system "../../pubmedref/archivearticle.dtd" [ <!entity % ents system "../../pubmedref/entities.ent"> %ents; ]> <article>...</article> 

entity file (you have multiple files)

<!entity bull "&#8226;"> <!entity copy "&#169;"> 

however, browsers not resolve external entity reference you're stuck having entity declarations directly in internal subset (between [ , ] in doctype declaration).


Comments