Forum Bugs

Low priorty thing

Ben
I'm using Prince5 beta3.
I'm not sure if this is a bug, it might be intended, but I couldn't find it in the documentation anywhere.
It seems Prince5 handles character entities much better (for example, » and ’) which makes me happy. But this only works when they are found in the actual XML. If they are found in the content property within some css selector, they are not translated at all. Not only are they not translated, the entire content property is ignored. Is this supposed to be this way?
Should the content property be used to generate the text, and a '?' character or blankbox character be used in place of the unknown entity? For now I can use hex escapes to generate the characters (like in Prince4). Sorry if this is a nonissue.
Ben
mikeday
Numeric character entities, like α (GREEK SMALL LETTER ALPHA) are XML syntax for introducing UNICODE characters that are inconvenient to write directly in the document for whatever reason -- maybe the document encoding does not support them, or the user just does not have them available on the keyboard.

However, they are not part of CSS syntax; CSS uses slash escapes for this purpose, like this: \03b1

Now, you could theoretically use XML numeric character entities in your CSS if your CSS is inside an XML file, such as in the <style> element of an XHTML document. Because XML entities are expanded automatically when the document is parsed, this would be equivalent to writing the characters directly in your CSS in UTF-8 encoding. However, Prince does not yet support the use of arbitrary unescaped UTF-8 within CSS, which is why it will reject the property.

The solution is to use XML numeric character entities in your XML document content and the CSS slash-escaping mechanism in your CSS style sheets, then everything will be fine :)
mikeday
This issue has been fixed in Prince 5.1 rev 3, so that you can use XML entities or UNICODE characters directly in CSS strings within the <style> element.