2 Replies Latest reply on Feb 4, 2010 4:43 AM by Ralu Jucan

    Problem with <ui:include> / <aj4:include> when working with special characters

    Ralu Jucan Newbie

      Hi everybody,



      I'm using tinyMCE to write articles. I save them as .xhtml files and display them using


      <ui:include src="#{handler.tempFilePath}#{handler.fileName}"/>


      Everything is working fine except for the fact that tinyMCE converts all special characters and umlauts to friendly code and I always get the following error:


      The entity "....." was referenced, but not declared.


      My main page has the following declaration:


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
          <!ENTITY % HTMLlat1 PUBLIC
              "-//W3C//ENTITIES Latin 1 for XHTML//EN"


          <!ENTITY % HTMLsymbol PUBLIC
               "-//W3C//ENTITIES Symbols for XHTML//EN"
          <!ENTITY % HTMLspecial PUBLIC
                  "-//W3C//ENTITIES Special for XHTML//EN"




      Still this doesn't help. If I replace every friendly code (for ex: &amp; with  &#38; ) than everything works fine. The problem is there are too many special characters that need to be replaced and I'm looking for a general solution.


      I've tried a4j:include but I have the same problem.

      I've also tried working with iframes although they are obsolete and if I add the DOCTYPE declaration in every .xhtml file everything works fine but I have a problem in IE8 ... the content of my file isn't displayed at all ... instead I get a popup giving me the possibility to open or save the file.


      When I include the DOCTYPE in the .xhtml file and try to use ui:include or a4j:include I get an error in Chrome and Safari and the content of my file can't be displayed.


      This page contains the following errors:

      error on line 331 at column 33: internal error

      Below is a rendering of the page up to the first error.


      does anybody have any idea, or does anybody know a workaround for this problem?