Hello,

I wish to generate the entities corresponding to the accented letters.  
For this I think it is necessary to use the filtering (class XxxxFilter).

I tested the method "testFilter" in the example TestBed.java
and I do not obtain the desired result.  It seems that the objects 
"filter" and "filter_1" are not taken into account.

I wrote a simpler example 

.................... Java Code
    public static void testFilter()
    {
        Document doc = new Document();
        doc.getBody().setAttributeFilterState(true);

        Filter filter = new CharacterFilter();
        filter.addAttribute("$","dollar");
        filter.addAttribute("#",Entities.POUND);

        P p = new P();
        p.setFilter(filter);
        p.setFilterState(true);
        p.addElement("Jonas said \"Greedy people make lots of ''' $  $ $ 
 weigh lots of # # # #\"");

        p.output(System.out);
        System.out.println();
        System.out.println();

        doc.appendBody(p);
        doc.output(System.out);
        System.out.println();
    }
.................... End Java Code

Here I obtain.

.................... Result
<p>Jonas said &#34;Greedy people make lots of &#8217;&#8217;&#8217; $  $ 
 &#38; weigh lots of # # # #&#34;

<html><head><title></title></head><body><p>Jonas said &#34;Greedy people 
ake lots of &#8217;&#8217;&#8217; $  $ $ &#38; weigh lots of # # # 
&#34;</body></html>
.................... End Result

Would I have omitted something?

Greetings.

Dominique Asselineau
-- 
+------------------------------------o-------------------------------------+
| P-mail:                            | E-mail:                             |
|   E.N.S.T. - Dep. TSI              |       [EMAIL PROTECTED]  |
|   Dominique Asselineau             |       [EMAIL PROTECTED] |
|   46, rue Barrault                 |                                     |
|   75634 PARIS Cedex 13 - France    |                                     |
+------------------------------------o-------------------------------------+


--
------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to