← Prev in month ← Prev in thread

Can't embed an ENTITY in a start tag?

From
Costello, Roger L. <>
To
"" <>
Date
2015-06-18T17:10:51Z
ID
<>
Thread
Can't embed an ENTITY in a start tag?
Hi Folks,

Here is an XML document:

<!DOCTYPE root [
      <!ENTITY   style-it   ' style="color:red; font-size:larger" '>
]>
<root>
       <span  &style-it;>...</span>
</root>

When I check that for well-formedness, I get this error message:

  	SXXP0003: Error reported by XML parser: 
	Element type "span" must be followed by 
	either attribute specifications, ">" or "/>".

Why do I get that error message?

I want to specify CSS styling at the top of the XML document (and use it inside many span tags in the XML document). What's the right way to accomplish this?

/Roger
← Prev in month ← Prev in thread