Pages: 1
Print
Author Topic: syntax for special characters  (Read 2123 times)
mgharvey2
Member

Posts: 2


« on: May 15, 2015, 11:09:19 AM »

XMetal 8.0.1.051, DITA 1.2

I have to use two special characters in my text; infinity and lowercase tau.

q<sub>&infin;</sub> looked like it was going to work, but XMetaL tells me I have invalid markup and no character shows up in the WebHelp output.

My heading looks like this:
<?xml version="1.0"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<!-- Created with XMetaL (http://www.xmetal.com) -->

What am I doing wrong?
Logged
barbwire
Member

Posts: 44


« Reply #1 on: May 18, 2015, 12:13:11 AM »

I think you should not use HTML entities. Try to set the file encoding to UTF-8 and just write the correct symbol. For example ∞.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2579



WWW
« Reply #2 on: May 21, 2015, 02:54:40 PM »

The DITA DTDs do not define any named character entities* (which is why you are being told the file is invalid as you are referencing an undefined entity). It is best to do as barbwire says and insert Unicode characters directly into the document.

*Note that this is not entirely true. The DITA DTDs define one named character entity but it is not recommended for use: &nbsp;
It was included in the original DTDs that IBM created and remains in all versions up to 1.3 but is marked as "deprecated" and will be removed in the 2.0 version of the DTDs.
« Last Edit: May 21, 2015, 03:03:59 PM by Derek Read » Logged
Pages: 1
Print
Jump to:  

email us