I am creating a left navigation system utilizing xml and xsl. Everything was been going great until I tried to use a special character in my xml document. I am using »
and I get th error.
reason: Reference to undefined entity 'raquo'.
error code: -1072898046
How do I make this work?
The only illegal characters are & , < and > (as well as " or ' in attributes, depending on which character is used to delimit the attribute value: attr="must use " here, ' is allowed" and attr='must use ' here, " is allowed' ). They're escaped using XML entities, in this case you want & for & .
Open an XML document in the text editing mode, right click inside it and there is a new menu item "Determine Complex Layout Chars".
To include special characters inside XML files you must use the numeric character reference instead of that character. The numeric character reference must be UTF-8 because the supported encoding for XML files is defined in the prolog as encoding="UTF-8" and should not be changed.
Answer. Special characters (such as <, >, &, ", and ' ) can be replaced in XML documents with their html entities using the DocumentKeywordReplace service. However, since html entities used within BPML are converted to the appropriate character, the string mode of DocumentKeywordReplace will not work in this instance.
You are trying to use an HTML entity in a non-HTML or non-XHTML document. These entities are declared in the document's Document Type Definition (DTD).
You should use the numerical Unicode version of the entity reference. For example, in the case of »
you should use »
Alternatively, you can define them in your XML document's DTD:
<!ENTITY entity-name "entity-value">
<!ENTITY raquo "»">
Otherwise, if your document is UTF-8, I believe you can just use the actual character directly in your XML document.
»
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With