Fix for bug 286132 (xml-stylesheet PI doesn't handle href attribute as in specification), checking in the right patch this time. r=sicking, sr=bz.

git-svn-id: svn://10.0.0.236/trunk@192539 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterv%propagandism.org
2006-03-17 14:38:57 +00:00
parent 9f6b4c4ae1
commit c7f6949390
12 changed files with 271 additions and 137 deletions

View File

@@ -160,6 +160,25 @@ class nsIParserService : public nsISupports {
const PRUnichar** aColon) = 0;
virtual PRBool IsXMLLetter(PRUnichar aChar) = 0;
virtual PRBool IsXMLNCNameChar(PRUnichar aChar) = 0;
/**
* Decodes an entity into a UTF-16 character. If a ; is found between aStart
* and aEnd it will try to decode the entity and set aNext to point to the
* character after the ;. The resulting UTF-16 character will be written in
* aResult, so if the entity is a valid numeric entity there needs to be
* space for at least two PRUnichars.
*
* @param aStart pointer to the character after the ampersand.
* @param aEnd pointer to the position after the last character of the
* string.
* @param aNext [out] will be set to the character after the ; or null if
* the decoding was unsuccessful.
* @param aResult the buffer to write the resulting UTF-16 character in.
* @return the number of PRUnichars written to aResult.
*/
virtual PRUint32 DecodeEntity(const PRUnichar* aStart, const PRUnichar* aEnd,
const PRUnichar** aNext,
PRUnichar* aResult) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIParserService, NS_IPARSERSERVICE_IID)