Percent HTML Entity

Having trouble installing Oxygen? Got a bug to report? Post it all here.
leematthew
Posts: 3
Joined: Sun May 30, 2004 7:43 am

Percent HTML Entity

Post by leematthew »

Hi,

I have an XML file that contains > and < HTML entities (for ">" and "<" respectively).

This document is validated by Oxygen.

However, when I attempt to add &percnt; (for "%"), oxygen will not validate my file.

Given that > and < validate, I'm assuming I don't have to by referencing some external schema (otherwise it would also contain &percnt;).

The only other alternative (that I can think of) is that support for > and < is built into oxygen. But that implies that &percnt; is not supported by oxygen.

Does anyone know?

Thanks,
Matt
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Matt,

The < , >, &, &quote; and &apos; entities are defined by the XML specification [1].

In order to use some other entities they have to be defined. For instance you can use the "New from templates" action [2] and create a new XHTML document like the one below:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
</body>
</html>
If you will enable the "Show all entities option" [3] you should be able to see in the content completion popup after you press "&" all the defined entities.

[1] http://www.w3.org/TR/2004/REC-xml-20040 ... efined-ent
[2] http://www.oxygenxml.com/doc/ug-oxygen/ ... -templates
[3] http://www.oxygenxml.com/doc/ug-oxygen/ ... etion.html

Best Regards,
George
Post Reply