Hi<br><br>In theory, shouldn&#39;t the vdl be responsible to indicate which prefix/suffix pattern is used to identify if a physical viewId should be handled by an specific vdl?. In my personal opinion it is more important to define some methods on vdl that handle this interaction properly and update the spec in that direction. That&#39;s the missing part of the puzzle.<br>
<br>See: [jsr-314-open] Should the ViewDeclarationLanguage be responsible to indicate if a viewId can be created?<br><br>regards,<br><br>Leonardo Uribe<br><br><div class="gmail_quote">2010/10/6 Blake Sullivan <span dir="ltr">&lt;<a href="mailto:blake.sullivan@oracle.com">blake.sullivan@oracle.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    Kito,<br>
    <br>
    It isn&#39;t that these parameters are newer, it is that these
    parameters potentially need to be configurable on a per-JAR level
    and we want the JAR to ship with its configuration.<br>
    <br>
    -- Blake Sullivan<br>
    <br>
    <br>
    On 10/6/10 8:35 AM, Kito Mann wrote:
    <blockquote type="cite">This sounds fine, but I&#39;m worried about introducing
      configuration in faces-config.xml that might ordinarily be in
      web.xml without a plan for how we handle existing parameters.
      Consistency is really important, especially for frameworks, and
      adding the configuration for this feature to faces-config.xml
      opens the door to having half of the configuration in
      faces-config.xml and half in web.xml with no obvious justification
      other than &quot;these parameters are newer&quot;. 
      <div>
        <br>
      </div>
      <div>So I think we should implement this as a standard web.xml
        context parameter, _or_ provide faces-config.xml support for all
        existing context parameters.<br>
        <div><br>
        </div>
        <div>---<br>
          Kito D. Mann | twitter: kito99 | Author, JSF in Action<br>
          Virtua, Inc. | <a href="http://www.virtua.com" target="_blank">http://www.virtua.com</a> |
          JSF/Java EE training and consulting<br>
          <a href="http://www.JSFCentral.com" target="_blank">http://www.JSFCentral.com</a>
          - JavaServer Faces FAQ, news, and info | twitter: jsfcentral<br>
          +1 203-404-4848 x3<br>
          <br>
          Sign up for the JSFCentral newsletter: <a href="http://oi.vresp.com/?fid=ac048d0e17" target="_blank">http://oi.vresp.com/?fid=ac048d0e17</a><br>
          <br>
          <br>
          <br>
          <div class="gmail_quote">On Thu, Sep 30, 2010 at 11:22 PM,
            Edward Burns <span dir="ltr">&lt;<a href="mailto:edward.burns@oracle.com" target="_blank">edward.burns@oracle.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
              <br>
              <a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=490" target="_blank">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=490</a><br>
              <br>
              As a first step towards making JSPX files runable as
              Facelets, this<br>
              commit introduces a new configuration syntax.<br>
              <br>
              Andy Schwartz requested this feature.<br>
              <br>
              For the first time ever, we are using the faces-config to
              specify<br>
              context-param like configuration options.  In this case,
              we&#39;re<br>
              leveraging the faces-config-extension facility.  Andy also
              suggested<br>
              this config concept.<br>
              <br>
              The automated test for this feature has the following
              faces-config.<br>
              <br>
              &lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39;?&gt;<br>
              &lt;faces-config<br>
               xmlns=&quot;<a href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a>&quot;<br>
               xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
               xsi:schemaLocation=&quot;<a href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a>
              <a href="http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" target="_blank">http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd</a>&quot;<br>
               version=&quot;2.0&quot;&gt;<br>
              <br>
               &lt;faces-config-extension&gt;<br>
                 &lt;facelets-processing&gt;<br>
                   &lt;file-extension&gt;.jspx&lt;/file-extension&gt;<br>
                   &lt;process-as&gt;jspx&lt;/process-as&gt;<br>
                 &lt;/facelets-processing&gt;<br>
                 &lt;facelets-processing&gt;<br>
                 
               &lt;file-extension&gt;.view.xml&lt;/file-extension&gt;<br>
                   &lt;process-as&gt;xml&lt;/process-as&gt;<br>
                 &lt;/facelets-processing&gt;<br>
               &lt;/faces-config-extension&gt;<br>
              <br>
              &lt;/faces-config&gt;<br>
              <br>
              The &lt;facelets-processing&gt; elements are new.<br>
              <br>
              The sample app also has these context params:<br>
              <br>
                 &lt;context-param&gt;<br>
                   
               &lt;param-name&gt;javax.faces.FACELETS_VIEW_MAPPINGS&lt;/param-name&gt;<br>
                   
               &lt;param-value&gt;*.xhtml;*.view.xml;*.jspx&lt;/param-value&gt;<br>
                 &lt;/context-param&gt;<br>
              <br>
                 &lt;context-param&gt;<br>
                   
               &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;<br>
                     &lt;param-value&gt;.xhtml .view.xml .jsp
              .jspx&lt;/param-value&gt;<br>
                 &lt;/context-param&gt;<br>
              <br>
              PENDING(edburns): Currently this feature relies on the
              existing<br>
              &lt;xsd:any&gt; declaration for the children of
              faces-config-extension.  I<br>
              would like to tighten this up to allow validaiton but will
              do it after<br>
              the 30 Sept deadline.<br>
              <br>
              The preceding faces-config and web.xml example must cause
              the<br>
              implementation to behave as follows.<br>
              <br>
               The web.xml says that jspx should be considered as one of
              the default<br>
               suffixes for JSF.  It also says that files with a .jspx
              extension must<br>
               be treated as facelets, not JSPs.<br>
              <br>
               The faces-config.xml says that files with the .jspx
              extension should be<br>
               treated as if they are running in Facelets for JSPX mode,
              as specified<br>
               in the following table.  It also says that files ending
              in .view.xml<br>
               must be handled as if they are running in Facelets for
              XML mode, also<br>
               specified in the table.<br>
              <br>
              <br>
               XML construct               process-as mode<br>
               -------------               ---------------<br>
              <br>
                                      xhtml           xml        jspx<br>
              XML Declaration          passed through  consumed  
              consumed<br>
              Processing Instructions  passed through  consumed  
              consumed<br>
              CDATA                    passed through  consumed  
              consumed<br>
              Inline text escaping     escaped         escaped    not
              escaped<br>
              Comments                 passed through  consumed  
              consumed<br>
              <br>
              PENDING(edburns): should the table specified above be the
              default, even<br>
              if no facelets-processing elements appear?  Right now, the<br>
              facelets-processing elements must appear, otherwise the
              legacy facelets<br>
              format is used in all facelet cases.  I think that&#39;s
              correct, but I am<br>
              open to suggestions.<br>
              <br>
              SECTION: Modified Files<br>
              ----------------------------<br>
              M      
              jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java<br>
              <br>
              - enhance this class, which previously only handled
              web.xml style<br>
               configuration, to also handle faces-config.xml style<br>
               configuration. The first manifestation of this is the new
              pair of<br>
               getFacesConfigOptionValue() methods, one with a boolean
              create<br>
               parameter.<br>
              <br>
              - To make the intent of the feature more clear, a define a
              read-only<br>
               singleton helper class, FaceletsConfiguration, which is
              owned by the<br>
               WebConfiguration.<br>
              <br>
              A      
              jsf-ri/src/main/java/com/sun/faces/config/FaceletsConfiguration.java<br>
              <br>
              - A place to hang methods that allow the runtime to query
              the facelets<br>
               configuration.  Currently this only includes config
              options conveyed<br>
               via the new faces-config-extension/facelets-processing
              elements.<br>
              <br>
              M
jsf-ri/src/main/java/com/sun/faces/facelets/compiler/LiteralTextInstruction.java<br>
              <br>
              - When writing inline text, use the new config facility to
              determine if<br>
               the text should be escaped or not.<br>
              <br>
              M
jsf-ri/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java<br>
              <br>
              - add some ivars and getters.<br>
              <br>
              M      
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java<br>
              <br>
              - To ease migration from JSPX to facelets, allow the new
              &lt;faces-view&gt;<br>
               markup element to exist in XHTML or XML pages, but make
              sure it gets<br>
               swallowed and does not appear in the output.  The
              startTag() and<br>
               endTag() methods were hit.<br>
              <br>
              M
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java<br>
              <br>
              - Take the correct action regarding CDATA, comments,<br>
               processingInstructions, and the XML declaration.<br>
              <br>
              M      
              jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java<br>
              <br>
              - Clean imports<br>
              <br>
              M      
              jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java<br>
              <br>
              - Add a new config processor for the
              faces-config-extension content.<br>
              <br>
              M      
              jsf-ri/src/main/java/com/sun/faces/config/ConfigureListener.java<br>
              M       jsf-ri/systest-per-webapp/build.xml<br>
              M       jsf-ri/systest-per-webapp/build-tests.xml<br>
              <br>
              - new automated test<br>
              <br>
              A
jsf-ri/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java<br>
              <br>
              - expose xml config to runtime.<br>
              <br>
              A       jsf-ri/systest-per-webapp/process-as-jspx<br>
              A       jsf-ri/systest-per-webapp/process-as-jspx/src<br>
              A       jsf-ri/systest-per-webapp/process-as-jspx/src/java<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces<br>
              A
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest<br>
              A
jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxTestCase.java<br>
              A
jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxBean.java<br>
              A       jsf-ri/systest-per-webapp/process-as-jspx/web<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspxview.jspx<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/web/xhtmlview.xhtml<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspview.jsp<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/web/xmlview.view.xml<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF<br>
              A
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/faces-config.xml<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/web.xml<br>
              A      
              jsf-ri/systest-per-webapp/process-as-jspx/web/index.html<br>
              <br>
              - Automated test.<br>
              <br>
              <br>
              SECTION: Diffs<br>
              ----------------------------<br>
              Index:
jsf-ri/src/main/java/com/sun/faces/facelets/compiler/LiteralTextInstruction.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/LiteralTextInstruction.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/LiteralTextInstruction.java
              (working copy)<br>
              @@ -55,10 +55,11 @@<br>
              <br>
               package com.sun.faces.facelets.compiler;<br>
              <br>
              +import com.sun.faces.config.FaceletsConfiguration;<br>
              +import javax.faces.context.FacesContext;<br>
              +import java.io.IOException;<br>
               import javax.el.ELContext;<br>
               import javax.el.ExpressionFactory;<br>
              -import javax.faces.context.FacesContext;<br>
              -import java.io.IOException;<br>
              <br>
               final class LiteralTextInstruction implements Instruction
              {<br>
                  private final String text;<br>
              @@ -68,7 +69,11 @@<br>
                  }<br>
              <br>
                  public void write(FacesContext context) throws
              IOException {<br>
              -        context.getResponseWriter().writeText(this.text,
              null);<br>
              +        if
              (FaceletsConfiguration.getInstance(context).isEscapeInlineText(context))
              {<br>
              +          
               context.getResponseWriter().writeText(this.text, null);<br>
              +        } else {<br>
              +            context.getResponseWriter().write(this.text);<br>
              +        }<br>
                  }<br>
              <br>
                  public Instruction apply(ExpressionFactory factory,
              ELContext ctx) {<br>
              Index:
jsf-ri/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/CompilationManager.java
              (working copy)<br>
              @@ -56,6 +56,7 @@<br>
              <br>
               package com.sun.faces.facelets.compiler;<br>
              <br>
              +import com.sun.faces.config.WebConfiguration;<br>
               import com.sun.faces.facelets.tag.TagAttributesImpl;<br>
               import com.sun.faces.facelets.tag.TagLibrary;<br>
               import
              com.sun.faces.facelets.tag.composite.CompositeLibrary;<br>
              @@ -102,6 +103,8 @@<br>
                  private final String alias;<br>
              <br>
                  private CompilationMessageHolder messageHolder = null;<br>
              +<br>
              +    private WebConfiguration config;<br>
              <br>
                  public CompilationManager(String alias, Compiler
              compiler) {<br>
              <br>
              @@ -125,6 +128,8 @@<br>
                      // our compilationunit stack<br>
                      this.units = new Stack&lt;CompilationUnit&gt;();<br>
                      this.units.push(new CompilationUnit());<br>
              +<br>
              +        config = WebConfiguration.getInstance();<br>
              <br>
                  }<br>
              <br>
              @@ -139,6 +144,14 @@<br>
                      }<br>
                      return messageHolder;<br>
                  }<br>
              +<br>
              +    public String getAlias() {<br>
              +        return alias;<br>
              +    }<br>
              +<br>
              +    public WebConfiguration getWebConfiguration() {<br>
              +        return config;<br>
              +    }<br>
              <br>
                  public void
              setCompilationMessageHolder(CompilationMessageHolder
              messageHolder) {<br>
                      this.messageHolder = messageHolder;<br>
              Index:
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/TextUnit.java
              (working copy)<br>
              @@ -54,13 +54,16 @@<br>
              <br>
               package com.sun.faces.facelets.compiler;<br>
              <br>
              +import com.sun.faces.config.FaceletsConfiguration;<br>
               import com.sun.faces.facelets.el.ELText;<br>
              <br>
               import javax.el.ELException;<br>
               import javax.faces.view.facelets.*;<br>
               import java.util.ArrayList;<br>
               import java.util.List;<br>
              +import java.util.Map;<br>
               import java.util.Stack;<br>
              +import java.util.concurrent.ConcurrentHashMap;<br>
              <br>
               /**<br>
               *<br>
              @@ -85,6 +88,14 @@<br>
              <br>
                  private final String id;<br>
              <br>
              +    private final static Map&lt;String, Boolean&gt;
              qNamesToSwallow;<br>
              +<br>
              +<br>
              +    static {<br>
              +        qNamesToSwallow = new
              ConcurrentHashMap&lt;String, Boolean&gt;(1);<br>
              +        qNamesToSwallow.put(&quot;faces-view&quot;, Boolean.TRUE);<br>
              +    }<br>
              +<br>
                  public TextUnit(String alias, String id) {<br>
                      this.alias = alias;<br>
                      <a href="http://this.id" target="_blank">this.id</a> = id;<br>
              @@ -168,16 +179,16 @@<br>
                  public void writeComment(String text) {<br>
                      this.finishStartTag();<br>
              <br>
              -        ELText el = ELText.parse(text);<br>
              -        if (el.isLiteral()) {<br>
              -            this.addInstruction(new
              LiteralCommentInstruction(text));<br>
              -        } else {<br>
              -            this.addInstruction(new
              CommentInstruction(el));<br>
              +            ELText el = ELText.parse(text);<br>
              +            if (el.isLiteral()) {<br>
              +                this.addInstruction(new
              LiteralCommentInstruction(text));<br>
              +            } else {<br>
              +                this.addInstruction(new
              CommentInstruction(el));<br>
              +            }<br>
              +<br>
              +            this.buffer.append(&quot;&lt;!--&quot; + text +
              &quot;--&gt;&quot;);<br>
                      }<br>
              <br>
              -        this.buffer.append(&quot;&lt;!--&quot; + text + &quot;--&gt;&quot;);<br>
              -    }<br>
              -<br>
                  public void startTag(Tag tag) {<br>
              <br>
                      // finish any previously written tags<br>
              @@ -185,36 +196,39 @@<br>
              <br>
                      // push this tag onto the stack<br>
                      this.tags.push(tag);<br>
              +        String qName = tag.getQName();<br>
              <br>
              -        // write it out<br>
              -        this.buffer.append(&#39;&lt;&#39;);<br>
              -        this.buffer.append(tag.getQName());<br>
              +        if (!qNamesToSwallow.containsKey(qName)) {<br>
              +            // write it out<br>
              +            this.buffer.append(&#39;&lt;&#39;);<br>
              +            this.buffer.append(qName);<br>
              <br>
              -        this.addInstruction(new
              StartElementInstruction(tag.getQName()));<br>
              +            this.addInstruction(new
              StartElementInstruction(tag.getQName()));<br>
              <br>
              -        TagAttribute[] attrs =
              tag.getAttributes().getAll();<br>
              -        if (attrs.length &gt; 0) {<br>
              -            for (int i = 0; i &lt; attrs.length; i++) {<br>
              -                String qname = attrs[i].getQName();<br>
              -                String value = attrs[i].getValue();<br>
              -                this.buffer.append(&#39;
              &#39;).append(qname).append(&quot;=\&quot;&quot;).append(<br>
              +            TagAttribute[] attrs =
              tag.getAttributes().getAll();<br>
              +            if (attrs.length &gt; 0) {<br>
              +                for (int i = 0; i &lt; attrs.length; i++)
              {<br>
              +                    String qname = attrs[i].getQName();<br>
              +                    String value = attrs[i].getValue();<br>
              +                    this.buffer.append(&#39;
              &#39;).append(qname).append(&quot;=\&quot;&quot;).append(<br>
                                      value).append(&quot;\&quot;&quot;);<br>
              <br>
              -                ELText txt = ELText.parse(value);<br>
              -                if (txt != null) {<br>
              -                    if (txt.isLiteral()) {<br>
              -                        this.addInstruction(new
              LiteralAttributeInstruction(<br>
              -                                qname, txt.toString()));<br>
              -                    } else {<br>
              -                        this.addInstruction(new
              AttributeInstruction(<br>
              -                                this.alias, qname, txt));<br>
              +                    ELText txt = ELText.parse(value);<br>
              +                    if (txt != null) {<br>
              +                        if (txt.isLiteral()) {<br>
              +                            this.addInstruction(new
              LiteralAttributeInstruction(<br>
              +                                    qname,
              txt.toString()));<br>
              +                        } else {<br>
              +                            this.addInstruction(new
              AttributeInstruction(<br>
              +                                    this.alias, qname,
              txt));<br>
              +                        }<br>
                                  }<br>
                              }<br>
                          }<br>
              +            // notify that we have an open tag<br>
              +            this.startTagOpen = true;<br>
                      }<br>
              <br>
              -        // notify that we have an open tag<br>
              -        this.startTagOpen = true;<br>
                  }<br>
              <br>
                  private void finishStartTag() {<br>
              @@ -227,13 +241,17 @@<br>
                  public void endTag() {<br>
                      Tag tag = (Tag) this.tags.pop();<br>
              <br>
              -        this.addInstruction(new
              EndElementInstruction(tag.getQName()));<br>
              +        String qName = tag.getQName();<br>
              <br>
              -        if (this.startTagOpen) {<br>
              -            this.buffer.append(&quot;/&gt;&quot;);<br>
              -            this.startTagOpen = false;<br>
              -        } else {<br>
              -          
               this.buffer.append(&quot;&lt;/&quot;).append(tag.getQName()).append(&#39;&gt;&#39;);<br>
              +        if (!qNamesToSwallow.containsKey(qName)) {<br>
              +            this.addInstruction(new
              EndElementInstruction(qName));<br>
              +<br>
              +            if (this.startTagOpen) {<br>
              +                this.buffer.append(&quot;/&gt;&quot;);<br>
              +                this.startTagOpen = false;<br>
              +            } else {<br>
              +
              this.buffer.append(&quot;&lt;/&quot;).append(tag.getQName()).append(&#39;&gt;&#39;);<br>
              +            }<br>
                      }<br>
                  }<br>
              <br>
              Index:
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java
              (working copy)<br>
              @@ -55,6 +55,7 @@<br>
               package com.sun.faces.facelets.compiler;<br>
              <br>
               import com.sun.faces.RIConstants;<br>
              +import com.sun.faces.config.FaceletsConfiguration;<br>
               import com.sun.faces.config.WebConfiguration;<br>
               import com.sun.faces.facelets.tag.TagAttributeImpl;<br>
               import com.sun.faces.facelets.tag.TagAttributesImpl;<br>
              @@ -71,6 +72,7 @@<br>
               import java.io.IOException;<br>
               import java.io.InputStream;<br>
               import java.net.URL;<br>
              +import java.util.Map;<br>
               import java.util.regex.Matcher;<br>
               import java.util.regex.Pattern;<br>
              <br>
              @@ -96,6 +98,8 @@<br>
                      protected Locator locator;<br>
              <br>
                      protected final CompilationManager unit;<br>
              +<br>
              +        private boolean inSuppressedCDATA;<br>
              <br>
                      public CompilationHandler(CompilationManager unit,
              String alias) {<br>
                          this.unit = unit;<br>
              @@ -105,14 +109,18 @@<br>
                      public void characters(char[] ch, int start, int
              length)<br>
                              throws SAXException {<br>
                          if (this.inDocument) {<br>
              -                this.unit.writeText(new String(ch, start,
              length));<br>
              +                if (!inSuppressedCDATA) {<br>
              +                    this.unit.writeText(new String(ch,
              start, length));<br>
              +                }<br>
                          }<br>
                      }<br>
              <br>
                      public void comment(char[] ch, int start, int
              length)<br>
                              throws SAXException {<br>
                          if (this.inDocument) {<br>
              -                this.unit.writeComment(new String(ch,
              start, length));<br>
              +                if
              (!unit.getWebConfiguration().getFaceletsConfiguration().isConsumeComments(alias))
              {<br>
              +                    this.unit.writeComment(new String(ch,
              start, length));<br>
              +                }<br>
                          }<br>
                      }<br>
              <br>
              @@ -134,7 +142,10 @@<br>
              <br>
                      public void endCDATA() throws SAXException {<br>
                          if (this.inDocument) {<br>
              -                this.unit.writeInstruction(&quot;]]&gt;&quot;);<br>
              +                if
              (!unit.getWebConfiguration().getFaceletsConfiguration().isConsumeCDATA(alias))
              {<br>
              +                    this.unit.writeInstruction(&quot;]]&gt;&quot;);<br>
              +                }<br>
              +                this.inSuppressedCDATA = false;<br>
                          }<br>
                      }<br>
              <br>
              @@ -192,7 +203,12 @@<br>
              <br>
                      public void startCDATA() throws SAXException {<br>
                          if (this.inDocument) {<br>
              -              
               this.unit.writeInstruction(&quot;&lt;![CDATA[&quot;);<br>
              +                if
              (!unit.getWebConfiguration().getFaceletsConfiguration().isConsumeCDATA(alias))
              {<br>
              +                    inSuppressedCDATA = false;<br>
              +                  
               this.unit.writeInstruction(&quot;&lt;![CDATA[&quot;);<br>
              +                } else {<br>
              +                    inSuppressedCDATA = true;<br>
              +                }<br>
                          }<br>
                      }<br>
              <br>
              @@ -241,10 +257,18 @@<br>
                      public void processingInstruction(String target,
              String data)<br>
                              throws SAXException {<br>
                          if (this.inDocument) {<br>
              -                StringBuffer sb = new StringBuffer(64);<br>
              -              
               sb.append(&quot;&lt;?&quot;).append(target).append(&#39;
              &#39;).append(data).append(<br>
              -                        &quot;?&gt;\n&quot;);<br>
              -              
               this.unit.writeInstruction(sb.toString());<br>
              +<br>
              +                // If there is a process-as value for the
              extension, only allow<br>
              +                // the PI to be written if its value is
              xhtml<br>
              +                boolean processAsXhtml =<br>
              +
this.unit.getWebConfiguration().getFaceletsConfiguration().isProcessCurrentDocumentAsFaceletsXhtml(alias);<br>
              +<br>
              +                if (processAsXhtml) {<br>
              +                    StringBuffer sb = new
              StringBuffer(64);<br>
              +                  
               sb.append(&quot;&lt;?&quot;).append(target).append(&#39;
              &#39;).append(data).append(<br>
              +                            &quot;?&gt;\n&quot;);<br>
              +                  
               this.unit.writeInstruction(sb.toString());<br>
              +                }<br>
                          }<br>
                      }<br>
                  }<br>
              @@ -418,8 +442,16 @@<br>
                              String r = new String(b);<br>
                              Matcher m = XmlDeclaration.matcher(r);<br>
                              if (m.find()) {<br>
              -                    WebConfiguration config =
              WebConfiguration.getInstance();<br>
              -                    if
              (!config.isOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.SuppressXmlDeclaration))
              {<br>
              +                    WebConfiguration config =
              mngr.getWebConfiguration();<br>
              +                    FaceletsConfiguration faceletsConfig
              = config.getFaceletsConfiguration();<br>
              +                    boolean suppressXmlDeclIsEnabled =
config.isOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.SuppressXmlDeclaration);<br>
              +                    boolean currentModeIsXhtml =
              faceletsConfig.isProcessCurrentDocumentAsFaceletsXhtml(mngr.getAlias());<br>
              +<br>
              +                    // We want to write the XML
              declaration if and only if<br>
              +                    // The SuppressXmlDeclaration
              context-param is NOT enabled<br>
              +                    // and the file extension for the
              current file has a mapping<br>
              +                    // with the value of XHTML<br>
              +                    if (!suppressXmlDeclIsEnabled
              &amp;&amp; currentModeIsXhtml) {<br>
                                      mngr.writeInstruction(m.group(0) +
              &quot;\n&quot;);<br>
                                      if (m.group(3) != null) {<br>
                                          encoding = m.group(3);<br>
              Index:
              jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/facelets/tag/xml/XmlLibrary.java
              (working copy)<br>
              @@ -54,7 +54,6 @@<br>
              <br>
               package com.sun.faces.facelets.tag.xml;<br>
              <br>
              -import com.sun.faces.facelets.tag.composite.*;<br>
               import com.sun.faces.facelets.tag.AbstractTagLibrary;<br>
              <br>
               /**<br>
              Index:
jsf-ri/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java
              (revision 0)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/config/processor/FacesConfigExtensionProcessor.java
              (revision 0)<br>
              @@ -0,0 +1,183 @@<br>
              +/*<br>
              + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS
              HEADER.<br>
              + *<br>
              + * Copyright 1997-2010 Sun Microsystems, Inc. All rights
              reserved.<br>
              + *<br>
              + * The contents of this file are subject to the terms of
              either the GNU<br>
              + * General Public License Version 2 only (&quot;GPL&quot;) or the
              Common Development<br>
              + * and Distribution License(&quot;CDDL&quot;) (collectively, the
              &quot;License&quot;).  You<br>
              + * may not use this file except in compliance with the
              License. You can obtain<br>
              + * a copy of the License at <a href="https://glassfish.dev.java.net/public/CDDL+GPL.html" target="_blank">https://glassfish.dev.java.net/public/CDDL+GPL.html</a><br>
              + * or glassfish/bootstrap/legal/LICENSE.txt.  See the
              License for the specific<br>
              + * language governing permissions and limitations under
              the License.<br>
              + *<br>
              + * When distributing the software, include this License
              Header Notice in each<br>
              + * file and include the License file at
              glassfish/bootstrap/legal/LICENSE.txt.<br>
              + * Sun designates this particular file as subject to the
              &quot;Classpath&quot; exception<br>
              + * as provided by Sun in the GPL Version 2 section of the
              License file that<br>
              + * accompanied this code.  If applicable, add the
              following below the License<br>
              + * Header, with the fields enclosed by brackets []
              replaced by your own<br>
              + * identifying information: &quot;Portions Copyrighted [year]<br>
              + * [name of copyright owner]&quot;<br>
              + *<br>
              + * Contributor(s):<br>
              + *<br>
              + * If you wish your version of this file to be governed
              by only the CDDL or<br>
              + * only the GPL Version 2, indicate your decision by
              adding &quot;[Contributor]<br>
              + * elects to include this software in this distribution
              under the [CDDL or GPL<br>
              + * Version 2] license.&quot;  If you don&#39;t indicate a single
              choice of license, a<br>
              + * recipient has the option to distribute your version of
              this file under<br>
              + * either the CDDL, the GPL Version 2 or to extend the
              choice of license to<br>
              + * its licensees as provided above.  However, if you add
              GPL Version 2 code<br>
              + * and therefore, elected the GPL Version 2 license, then
              the option applies<br>
              + * only if the new code is made subject to such option by
              the copyright<br>
              + * holder.<br>
              + */<br>
              +<br>
              +package com.sun.faces.config.processor;<br>
              +<br>
              +import com.sun.faces.config.DocumentInfo;<br>
              +import com.sun.faces.config.WebConfiguration;<br>
              +import com.sun.faces.util.FacesLogger;<br>
              +import org.w3c.dom.Element;<br>
              +import org.w3c.dom.Node;<br>
              +import org.w3c.dom.NodeList;<br>
              +import org.w3c.dom.Document;<br>
              +<br>
              +import javax.servlet.ServletContext;<br>
              +<br>
              +import java.text.MessageFormat;<br>
              +import java.util.Map;<br>
              +import java.util.logging.Level;<br>
              +import java.util.logging.Logger;<br>
              +<br>
              +<br>
              +/**<br>
              + * &lt;p&gt;<br>
              + *  This &lt;code&gt;ConfigProcessor&lt;/code&gt; handles
              all elements defined under<br>
              + *  &lt;code&gt;/faces-config/factory&lt;/code&gt;.<br>
              + * &lt;/p&gt;<br>
              + */<br>
              +public class FacesConfigExtensionProcessor extends
              AbstractConfigProcessor {<br>
              +<br>
              +    private static final Logger LOGGER =
              FacesLogger.CONFIG.getLogger();<br>
              +<br>
              +    /**<br>
              +     *
              &lt;code&gt;/faces-config/faces-config-extension&lt;/code&gt;<br>
              +     */<br>
              +    private static final String FACES_CONFIG_EXTENSION =
              &quot;faces-config-extension&quot;;<br>
              +<br>
              +    /**<br>
              +     *
&lt;code&gt;/faces-config/faces-config-extension/facelets-processing&lt;/code&gt;<br>
              +     */<br>
              +    private static final String FACELETS_PROCESSING =
              &quot;facelets-processing&quot;;<br>
              +<br>
              +    /**<br>
              +     *
&lt;code&gt;/faces-config/faces-config-extension/facelets-processing/file-extension&lt;/code&gt;<br>
              +     */<br>
              +    private static final String FILE_EXTENSION =
              &quot;file-extension&quot;;<br>
              +<br>
              +    /**<br>
              +     *
&lt;code&gt;/faces-config/faces-config-extension/facelets-processing/process-as&lt;/code&gt;<br>
              +     */<br>
              +    private static final String PROCESS_AS =
              &quot;process-as&quot;;<br>
              +<br>
              +    //
              ------------------------------------------------------------
              Constructors<br>
              +<br>
              +<br>
              +    public FacesConfigExtensionProcessor() { }<br>
              +<br>
              +<br>
              +    // --------------------------------------------
              Methods from ConfigProcessor<br>
              +<br>
              +<br>
              +    /**<br>
              +     * @see
ConfigProcessor#process(javax.servlet.ServletContext,com.sun.faces.config.DocumentInfo[])<br>
              +     */<br>
              +    public void process(ServletContext sc, DocumentInfo[]
              documentInfos)<br>
              +    throws Exception {<br>
              +<br>
              +        for (int i = 0; i &lt; documentInfos.length; i++)
              {<br>
              +            if (LOGGER.isLoggable(Level.FINE)) {<br>
              +                LOGGER.log(Level.FINE,<br>
              +                           MessageFormat.format(<br>
              +                                &quot;Processing
              faces-config-extension elements for document: &#39;&#39;{0}&#39;&#39;&quot;,<br>
              +                              
               documentInfos[i].getSourceURL()));<br>
              +            }<br>
              +            Document document =
              documentInfos[i].getDocument();<br>
              +            String namespace =
              document.getDocumentElement()<br>
              +                 .getNamespaceURI();<br>
              +            NodeList facesConfigExtensions =
              document.getDocumentElement()<br>
              +                 .getElementsByTagNameNS(namespace,
              FACES_CONFIG_EXTENSION);<br>
              +            if (facesConfigExtensions != null &amp;&amp;
              facesConfigExtensions.getLength() &gt; 0) {<br>
              +              
               processFacesConfigExtensions(facesConfigExtensions,<br>
              +                                 namespace,
              documentInfos[i]);<br>
              +            }<br>
              +        }<br>
              +<br>
              +        // invoke the next config processor<br>
              +        invokeNext(sc, documentInfos);<br>
              +<br>
              +    }<br>
              +<br>
              +    //
              ---------------------------------------------------------
              Private Methods<br>
              +<br>
              +<br>
              +    private void processFacesConfigExtensions(NodeList
              facesConfigExtensions,<br>
              +                                  String namespace,
              DocumentInfo info) {<br>
              +        WebConfiguration config = null;<br>
              +<br>
              +        for (int i = 0, size =
              facesConfigExtensions.getLength(); i &lt; size; i++) {<br>
              +            Node facesConfigExtension =
              facesConfigExtensions.item(i);<br>
              +            NodeList children = ((Element)
              facesConfigExtension)<br>
              +                 .getElementsByTagNameNS(namespace, &quot;*&quot;);<br>
              +            for (int c = 0, csize = children.getLength();
              c &lt; csize; c++) {<br>
              +                Node n = children.item(c);<br>
              +                if
              (FACELETS_PROCESSING.equals(n.getLocalName())) {<br>
              +                    Node faceletsProcessing = n;<br>
              +                    NodeList faceletsProcessingChildren =
              ((Element) faceletsProcessing)<br>
              +                          
              .getElementsByTagNameNS(namespace, &quot;*&quot;);<br>
              +                    String fileExtension = null,
              processAs = null;<br>
              +                    for (int fp = 0, fpsize =
              faceletsProcessingChildren.getLength(); fp &lt; fpsize;
              fp++) {<br>
              +                        Node childOfInterset =
              faceletsProcessingChildren.item(fp);<br>
              +                        if (null == fileExtension
              &amp;&amp;<br>
              + FILE_EXTENSION.equals(childOfInterset.getLocalName())) {<br>
              +                            fileExtension =
              getNodeText(childOfInterset);<br>
              +                        } else if (null == processAs
              &amp;&amp;<br>
              + PROCESS_AS.equals(childOfInterset.getLocalName())) {<br>
              +                            processAs =
              getNodeText(childOfInterset);<br>
              +                        } else {<br>
              +                            if
              (LOGGER.isLoggable(Level.WARNING)) {<br>
              +                                LOGGER.log(Level.WARNING,<br>
              +                                      
               MessageFormat.format(<br>
              +                                        &quot;Processing
              faces-config-extension elements for document: &#39;&#39;{0}&#39;&#39;,
              encountered unexpected configuration &#39;&#39;{1}&#39;&#39;, ignoring and
              continuing&quot;,<br>
              +                                      
               info.getSourceURL(), getNodeText(childOfInterset)));<br>
              +                            }<br>
              +                        }<br>
              +<br>
              +                    }<br>
              +<br>
              +                    if (null != fileExtension &amp;&amp;
              null != processAs) {<br>
              +                        if (null == config) {<br>
              +                            config =
              WebConfiguration.getInstance();<br>
              +                        }<br>
              +                        Map&lt;String, String&gt;
              faceletsProcessingMappings =<br>
              +
              config.getFacesConfigOptionValue(WebConfiguration.WebContextInitParameter.FaceletsProcessingFileExtensionProcessAs,
              true);<br>
              +                      
               faceletsProcessingMappings.put(fileExtension, processAs);<br>
              +<br>
              +                    } else {<br>
              +                        if
              (LOGGER.isLoggable(Level.WARNING)) {<br>
              +                            LOGGER.log(Level.WARNING,<br>
              +                                    MessageFormat.format(<br>
              +                                    &quot;Processing
              faces-config-extension elements for document: &#39;&#39;{0}&#39;&#39;,
              encountered &lt;facelets-processing&gt; elemnet without
              expected children&quot;,<br>
              +                                  
               info.getSourceURL()));<br>
              +                        }<br>
              +                    }<br>
              +                }<br>
              +            }<br>
              +        }<br>
              +<br>
              +    }<br>
              +<br>
              +<br>
              +}<br>
              Index:
              jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java
              (working copy)<br>
              @@ -62,6 +62,7 @@<br>
               import
              com.sun.faces.config.processor.RenderKitConfigProcessor;<br>
               import
              com.sun.faces.config.processor.ValidatorConfigProcessor;<br>
               import
              com.sun.faces.config.processor.FaceletTaglibConfigProcessor;<br>
              +import
              com.sun.faces.config.processor.FacesConfigExtensionProcessor;<br>
               import com.sun.faces.util.FacesLogger;<br>
               import com.sun.faces.util.Timer;<br>
               import org.xml.sax.InputSource;<br>
              @@ -252,6 +253,7 @@<br>
                           new RenderKitConfigProcessor(),<br>
                           new NavigationConfigProcessor(),<br>
                           new BehaviorConfigProcessor(),<br>
              +             new FacesConfigExtensionProcessor()<br>
                      };<br>
                      for (int i = 0; i &lt; configProcessors.length;
              i++) {<br>
                          ConfigProcessor p = configProcessors[i];<br>
              Index:
              jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java
              (working copy)<br>
              @@ -40,7 +40,6 @@<br>
               import java.util.EnumMap;<br>
               import java.util.Enumeration;<br>
               import java.util.HashSet;<br>
              -import java.util.List;<br>
               import java.util.Map;<br>
               import java.util.Set;<br>
               import java.util.logging.Level;<br>
              @@ -59,8 +58,10 @@<br>
              <br>
               import com.sun.faces.util.FacesLogger;<br>
               import com.sun.faces.util.Util;<br>
              +import java.util.Collections;<br>
              <br>
               import java.util.HashMap;<br>
              +import java.util.concurrent.ConcurrentHashMap;<br>
               import javax.faces.component.UIInput;<br>
               import javax.faces.validator.BeanValidator;<br>
               import javax.faces.view.facelets.ResourceResolver;<br>
              @@ -90,6 +91,9 @@<br>
                  private Map&lt;WebContextInitParameter, String&gt;
              contextParameters =<br>
                        new EnumMap&lt;WebContextInitParameter,
              String&gt;(WebContextInitParameter.class);<br>
              <br>
              +    private Map&lt;WebContextInitParameter,
              Map&lt;String, String&gt;&gt; facesConfigParameters =<br>
              +            new EnumMap&lt;WebContextInitParameter,
              Map&lt;String,
              String&gt;&gt;(WebContextInitParameter.class);<br>
              +<br>
                  private Map&lt;WebEnvironmentEntry, String&gt;
              envEntries =<br>
                        new EnumMap&lt;WebEnvironmentEntry,
              String&gt;(WebEnvironmentEntry.class);<br>
              <br>
              @@ -101,7 +105,9 @@<br>
              <br>
                  private ArrayList&lt;DeferredLoggingAction&gt;
              deferredLoggingActions;<br>
              <br>
              +    private FaceletsConfiguration faceletsConfig;<br>
              <br>
              +<br>
                  //
              ------------------------------------------------------------
              Constructors<br>
              <br>
              <br>
              @@ -228,6 +234,39 @@<br>
                      return result;<br>
              <br>
                  }<br>
              +<br>
              +    public FaceletsConfiguration
              getFaceletsConfiguration() {<br>
              +<br>
              +        if (null == faceletsConfig) {<br>
              +            faceletsConfig = new
              FaceletsConfiguration(this);<br>
              +        }<br>
              +        return faceletsConfig;<br>
              +<br>
              +    }<br>
              +<br>
              +    public Map&lt;String, String&gt;
              getFacesConfigOptionValue(WebContextInitParameter param,
              boolean create) {<br>
              +        Map&lt;String, String&gt; result = null;<br>
              +<br>
              +        assert(null != facesConfigParameters);<br>
              +<br>
              +        result = facesConfigParameters.get(param);<br>
              +        if (null == result) {<br>
              +            if (create) {<br>
              +                result = new ConcurrentHashMap&lt;String,
              String&gt;(3);<br>
              +                facesConfigParameters.put(param, result);<br>
              +            } else {<br>
              +                result = Collections.emptyMap();<br>
              +            }<br>
              +        }<br>
              +<br>
              +        return result;<br>
              +<br>
              +    }<br>
              +<br>
              +    public Map&lt;String, String&gt;
              getFacesConfigOptionValue(WebContextInitParameter param) {<br>
              +        return getFacesConfigOptionValue(param, false);<br>
              +    }<br>
              +<br>
              <br>
                  public String[] getOptionValue(WebContextInitParameter
              param, String sep) {<br>
                      String [] result;<br>
              @@ -335,7 +374,7 @@<br>
                  }<br>
              <br>
              <br>
              -    public void doLoggingActions() {<br>
              +    public void doPostBringupActions() {<br>
              <br>
                      if (deferredLoggingActions != null) {<br>
                          for (DeferredLoggingAction loggingAction :
              deferredLoggingActions) {<br>
              @@ -892,6 +931,10 @@<br>
                      FaceletCache(<br>
                          &quot;com.sun.faces.faceletCache&quot;,<br>
                          &quot;&quot;<br>
              +        ),<br>
              +        FaceletsProcessingFileExtensionProcessAs(<br>
              +                &quot;&quot;,<br>
              +                &quot;&quot;<br>
                      );<br>
              <br>
              <br>
              Index:
              jsf-ri/src/main/java/com/sun/faces/config/FaceletsConfiguration.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/config/FaceletsConfiguration.java
              (revision 0)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/config/FaceletsConfiguration.java
              (revision 0)<br>
              @@ -0,0 +1,191 @@<br>
              +<br>
              +/*<br>
              + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS
              HEADER.<br>
              + *<br>
              + * Copyright 1997-2010 Sun Microsystems, Inc. All rights
              reserved.<br>
              + *<br>
              + * The contents of this file are subject to the terms of
              either the GNU<br>
              + * General Public License Version 2 only (&quot;GPL&quot;) or the
              Common Development<br>
              + * and Distribution License(&quot;CDDL&quot;) (collectively, the
              &quot;License&quot;).  You<br>
              + * may not use this file except in compliance with the
              License. You can obtain<br>
              + * a copy of the License at <a href="https://glassfish.dev.java.net/public/CDDL+GPL.html" target="_blank">https://glassfish.dev.java.net/public/CDDL+GPL.html</a><br>
              + * or glassfish/bootstrap/legal/LICENSE.txt.  See the
              License for the specific<br>
              + * language governing permissions and limitations under
              the License.<br>
              + *<br>
              + * When distributing the software, include this License
              Header Notice in each<br>
              + * file and include the License file at
              glassfish/bootstrap/legal/LICENSE.txt.<br>
              + * Sun designates this particular file as subject to the
              &quot;Classpath&quot; exception<br>
              + * as provided by Sun in the GPL Version 2 section of the
              License file that<br>
              + * accompanied this code.  If applicable, add the
              following below the License<br>
              + * Header, with the fields enclosed by brackets []
              replaced by your own<br>
              + * identifying information: &quot;Portions Copyrighted [year]<br>
              + * [name of copyright owner]&quot;<br>
              + *<br>
              + * Contributor(s):<br>
              + *<br>
              + * If you wish your version of this file to be governed
              by only the CDDL or<br>
              + * only the GPL Version 2, indicate your decision by
              adding &quot;[Contributor]<br>
              + * elects to include this software in this distribution
              under the [CDDL or GPL<br>
              + * Version 2] license.&quot;  If you don&#39;t indicate a single
              choice of license, a<br>
              + * recipient has the option to distribute your version of
              this file under<br>
              + * either the CDDL, the GPL Version 2 or to extend the
              choice of license to<br>
              + * its licensees as provided above.  However, if you add
              GPL Version 2 code<br>
              + * and therefore, elected the GPL Version 2 license, then
              the option applies<br>
              + * only if the new code is made subject to such option by
              the copyright<br>
              + * holder.<br>
              + */<br>
              +<br>
              +package com.sun.faces.config;<br>
              +<br>
              +import java.util.Map;<br>
              +import javax.faces.context.FacesContext;<br>
              +<br>
              +<br>
              +/*<br>
              + * This read-only singleton class is vended by the
              WebConfiguration.<br>
              + * It is queried from any point in the program that needs
              to take action based<br>
              + * on configuration options pertaining to facelets.<br>
              + *<br>
              + */<br>
              +public class FaceletsConfiguration {<br>
              +<br>
              +    public static final String
              FACELETS_CONFIGURATION_ATTRIBUTE_NAME =
              &quot;com.sun.faces.config.FaceletsConfiguration&quot;;<br>
              +<br>
              +    private static final String
              ESCAPE_INLINE_TEXT_ATTRIBUTE_NAME =
              &quot;com.sun.faces.config.EscapeInlineText&quot;;<br>
              +<br>
              +    private static final String
              CONSUME_COMMENTS_ATTRIBUTE_NAME =
              &quot;com.sun.faces.config.ConsumeComments&quot;;<br>
              +<br>
              +    private WebConfiguration config;<br>
              +<br>
              +    private  Map&lt;String, String&gt;
              faceletsProcessingMappings;<br>
              +<br>
              +<br>
              +    public FaceletsConfiguration(WebConfiguration config)
              {<br>
              +        this.config = config;<br>
              +<br>
              +        faceletsProcessingMappings =<br>
              +
config.getFacesConfigOptionValue(WebConfiguration.WebContextInitParameter.FaceletsProcessingFileExtensionProcessAs);<br>
              +<br>
              +    }<br>
              +<br>
              +    public boolean
              isProcessCurrentDocumentAsFaceletsXhtml(String alias) {<br>
              +        // We want to write the XML declaration if and
              only if<br>
              +        // The SuppressXmlDeclaration context-param is
              NOT enabled<br>
              +        // and the file extension for the current file
              has a mapping<br>
              +        // with the value of XHTML<br>
              +        boolean currentModeIsXhtml = true;<br>
              +        String extension = alias;<br>
              +        if (null == extension) {<br>
              +            extension = &quot;.xhtml&quot;;<br>
              +        }<br>
              +        int i = extension.indexOf(&quot;.&quot;);<br>
              +        if (-1 != i &amp;&amp; 1 &lt; extension.length())
              {<br>
              +            extension = extension.substring(i);<br>
              +        } else {<br>
              +            extension = &quot;.xhtml&quot;;<br>
              +        }<br>
              +<br>
              +        assert (null != faceletsProcessingMappings);<br>
              +        if
              (faceletsProcessingMappings.containsKey(extension)) {<br>
              +            String value =
              faceletsProcessingMappings.get(extension);<br>
              +            currentModeIsXhtml = value.equals(&quot;xhtml&quot;);<br>
              +        }<br>
              +<br>
              +        return currentModeIsXhtml;<br>
              +    }<br>
              +<br>
              +    public boolean isConsumeComments(String alias) {<br>
              +        boolean consumeComments = false;<br>
              +        String extension = alias;<br>
              +        if (null == extension) {<br>
              +            extension = &quot;.xhtml&quot;;<br>
              +        }<br>
              +        int i = extension.indexOf(&quot;.&quot;);<br>
              +        if (-1 != i &amp;&amp; 1 &lt; extension.length())
              {<br>
              +            extension = extension.substring(i);<br>
              +        } else {<br>
              +            extension = &quot;.xhtml&quot;;<br>
              +        }<br>
              +<br>
              +        assert (null != faceletsProcessingMappings);<br>
              +        if
              (faceletsProcessingMappings.containsKey(extension)) {<br>
              +            String value =
              faceletsProcessingMappings.get(extension);<br>
              +            consumeComments = value.equals(&quot;xml&quot;) ||
              value.equals(&quot;jspx&quot;);<br>
              +        }<br>
              +<br>
              +        return consumeComments;<br>
              +<br>
              +    }<br>
              +<br>
              +    public boolean isConsumeCDATA(String alias) {<br>
              +        boolean consumeCDATA = false;<br>
              +        String extension = alias;<br>
              +        if (null == extension) {<br>
              +            extension = &quot;.xhtml&quot;;<br>
              +        }<br>
              +        int i = extension.indexOf(&quot;.&quot;);<br>
              +        if (-1 != i &amp;&amp; 1 &lt; extension.length())
              {<br>
              +            extension = extension.substring(i);<br>
              +        } else {<br>
              +            extension = &quot;.xhtml&quot;;<br>
              +        }<br>
              +<br>
              +        assert (null != faceletsProcessingMappings);<br>
              +        if
              (faceletsProcessingMappings.containsKey(extension)) {<br>
              +            String value =
              faceletsProcessingMappings.get(extension);<br>
              +            consumeCDATA = value.equals(&quot;jspx&quot;) ||
              value.equals(&quot;xml&quot;);<br>
              +        }<br>
              +<br>
              +        return consumeCDATA;<br>
              +<br>
              +    }<br>
              +<br>
              +    public boolean isEscapeInlineText(FacesContext
              context) {<br>
              +        Boolean result = Boolean.TRUE;<br>
              +<br>
              +        result = (Boolean)
              context.getAttributes().get(ESCAPE_INLINE_TEXT_ATTRIBUTE_NAME);<br>
              +        if (null == result) {<br>
              +            String extension =
              context.getViewRoot().getViewId();<br>
              +            if (null == extension) {<br>
              +                extension = &quot;.xhtml&quot;;<br>
              +            }<br>
              +            int i = extension.indexOf(&quot;.&quot;);<br>
              +            if (-1 != i &amp;&amp; 1 &lt;
              extension.length()) {<br>
              +                extension = extension.substring(i);<br>
              +            } else {<br>
              +                extension = &quot;.xhtml&quot;;<br>
              +            }<br>
              +<br>
              +            assert (null != faceletsProcessingMappings);<br>
              +            if
              (faceletsProcessingMappings.containsKey(extension)) {<br>
              +                String value =
              faceletsProcessingMappings.get(extension);<br>
              +                result = value.equals(&quot;xml&quot;) ||
              value.equals(&quot;xhtml&quot;);<br>
              +            } else {<br>
              +                result = Boolean.TRUE;<br>
              +            }<br>
              +          
               context.getAttributes().put(ESCAPE_INLINE_TEXT_ATTRIBUTE_NAME,<br>
              +                    result);<br>
              +        }<br>
              +<br>
              +        return result;<br>
              +    }<br>
              +<br>
              +    public static FaceletsConfiguration
              getInstance(FacesContext context) {<br>
              +        FaceletsConfiguration result = null;<br>
              +        Map&lt;Object, Object&gt; attrs =
              context.getAttributes();<br>
              +        result = (FaceletsConfiguration)
              attrs.get(FaceletsConfiguration.FACELETS_CONFIGURATION_ATTRIBUTE_NAME);<br>
              +        if (null == result) {<br>
              +            WebConfiguration config =
              WebConfiguration.getInstance(context.getExternalContext());<br>
              +            result = config.getFaceletsConfiguration();<br>
              +
              attrs.put(FaceletsConfiguration.FACELETS_CONFIGURATION_ATTRIBUTE_NAME,
              result);<br>
              +        }<br>
              +        return result;<br>
              +    }<br>
              +<br>
              +    public static FaceletsConfiguration getInstance() {<br>
              +        FacesContext context =
              FacesContext.getCurrentInstance();<br>
              +        return
              FaceletsConfiguration.getInstance(context);<br>
              +    }<br>
              +<br>
              +<br>
              +}<br>
              Index:
              jsf-ri/src/main/java/com/sun/faces/config/ConfigureListener.java<br>
===================================================================<br>
              ---
              jsf-ri/src/main/java/com/sun/faces/config/ConfigureListener.java
              (revision 8624)<br>
              +++
              jsf-ri/src/main/java/com/sun/faces/config/ConfigureListener.java
              (working copy)<br>
              @@ -266,7 +266,7 @@<br>
                                  UIViewRoot.class,<br>
                                  webAppListener);<br>
              <br>
              -            webConfig.doLoggingActions();<br>
              +            webConfig.doPostBringupActions();<br>
              <br>
                      } catch (Throwable t) {<br>
                          if (LOGGER.isLoggable(Level.SEVERE)) {<br>
              Index: jsf-ri/systest-per-webapp/build.xml<br>
===================================================================<br>
              --- jsf-ri/systest-per-webapp/build.xml (revision 8624)<br>
              +++ jsf-ri/systest-per-webapp/build.xml (working copy)<br>
              @@ -106,7 +106,8 @@<br>
                                 flash,<br>
                                 jsp-flash,<br>
                                 suppress-xml-decl,<br>
              -                   replace-vdl&quot;/&gt;<br>
              +                   replace-vdl,<br>
              +                   process-as-jspx&quot;/&gt;<br>
                  &lt;!--<br>
              <br>
                     EXCLUDED APPLICATIONS:<br>
              Index: jsf-ri/systest-per-webapp/build-tests.xml<br>
===================================================================<br>
              --- jsf-ri/systest-per-webapp/build-tests.xml   (revision
              8624)<br>
              +++ jsf-ri/systest-per-webapp/build-tests.xml   (working
              copy)<br>
              @@ -123,6 +123,8 @@<br>
              <br>
              value=&quot;com/sun/faces/systest/replacevdl/ReplaceViewDeclarationLanguageTestCase.class&quot;
              /&gt;<br>
                  &lt;property
               name=&quot;myfaces-uidata-component-state-test&quot;<br>
              <br>
              value=&quot;com/sun/faces/systest/myfaces_uidata_component_state_test/MyFacesUIDataTestCase.class&quot;
              /&gt;<br>
              +    &lt;property  name=&quot;process-as-jspx&quot;<br>
              +              
              value=&quot;com/sun/faces/systest/ProcessAsJspxTestCase.class&quot;
              /&gt;<br>
              <br>
                  &lt;!--<br>
                      EXCLUDED APPLICATIONS:<br>
              Index:
jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxTestCase.java<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxTestCase.java
              (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxTestCase.java
              (revision 0)<br>
              @@ -0,0 +1,132 @@<br>
              +/*<br>
              + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS
              HEADER.<br>
              + *<br>
              + * Copyright 1997-2007 Sun Microsystems, Inc. All rights
              reserved.<br>
              + *<br>
              + * The contents of this file are subject to the terms of
              either the GNU<br>
              + * General Public License Version 2 only (&quot;GPL&quot;) or the
              Common Development<br>
              + * and Distribution License(&quot;CDDL&quot;) (collectively, the
              &quot;License&quot;).  You<br>
              + * may not use this file except in compliance with the
              License. You can obtain<br>
              + * a copy of the License at <a href="https://glassfish.dev.java.net/public/CDDL+GPL.html" target="_blank">https://glassfish.dev.java.net/public/CDDL+GPL.html</a><br>
              + * or glassfish/bootstrap/legal/LICENSE.txt.  See the
              License for the specific<br>
              + * language governing permissions and limitations under
              the License.<br>
              + *<br>
              + * When distributing the software, include this License
              Header Notice in each<br>
              + * file and include the License file at
              glassfish/bootstrap/legal/LICENSE.txt.<br>
              + * Sun designates this particular file as subject to the
              &quot;Classpath&quot; exception<br>
              + * as provided by Sun in the GPL Version 2 section of the
              License file that<br>
              + * accompanied this code.  If applicable, add the
              following below the License<br>
              + * Header, with the fields enclosed by brackets []
              replaced by your own<br>
              + * identifying information: &quot;Portions Copyrighted [year]<br>
              + * [name of copyright owner]&quot;<br>
              + *<br>
              + * Contributor(s):<br>
              + *<br>
              + * If you wish your version of this file to be governed
              by only the CDDL or<br>
              + * only the GPL Version 2, indicate your decision by
              adding &quot;[Contributor]<br>
              + * elects to include this software in this distribution
              under the [CDDL or GPL<br>
              + * Version 2] license.&quot;  If you don&#39;t indicate a single
              choice of license, a<br>
              + * recipient has the option to distribute your version of
              this file under<br>
              + * either the CDDL, the GPL Version 2 or to extend the
              choice of license to<br>
              + * its licensees as provided above.  However, if you add
              GPL Version 2 code<br>
              + * and therefore, elected the GPL Version 2 license, then
              the option applies<br>
              + * only if the new code is made subject to such option by
              the copyright<br>
              + * holder.<br>
              + */<br>
              +<br>
              +package com.sun.faces.systest;<br>
              +<br>
              +<br>
              +import com.gargoylesoftware.htmlunit.html.HtmlPage;<br>
              +import com.sun.faces.htmlunit.AbstractTestCase;<br>
              +import java.io.BufferedReader;<br>
              +import java.io.InputStreamReader;<br>
              +import java.net.URL;<br>
              +import java.util.regex.Pattern;<br>
              +import junit.framework.Test;<br>
              +import junit.framework.TestSuite;<br>
              +<br>
              +<br>
              +public class ProcessAsJspxTestCase extends
              AbstractTestCase {<br>
              +<br>
              +    private final static Pattern XmlDeclaration =
              Pattern.compile(&quot;(?s)^&lt;\\?xml(\\s)*version=.*\\?&gt;.*&quot;);<br>
              +    private final static Pattern XmlPI =
              Pattern.compile(&quot;(?s).*&lt;\\?xml-stylesheet.*\\?&gt;.*&quot;);<br>
              +    private final static Pattern CDATASection =
              Pattern.compile(&quot;(?s).*&lt;!\\[CDATA\\[ .*\\]\\]&gt;.*&quot;);<br>
              +    private final static Pattern Comment =
              Pattern.compile(&quot;(?s).*&lt;!--.*--&gt;.*&quot;);<br>
              +    private final static Pattern EscapedText =
              Pattern.compile(&quot;(?s).*&amp;amp;lt;context-param&amp;amp;gt;.*&quot;);<br>
              +    private final static Pattern NotEscapedText =
              Pattern.compile(&quot;(?s).*&amp;lt;context-param&amp;gt;.*&quot;);<br>
              +<br>
              +<br>
              +    public ProcessAsJspxTestCase(String name) {<br>
              +        super(name);<br>
              +    }<br>
              +<br>
              +    /**<br>
              +     * Set up instance variables required by this test
              case.<br>
              +     */<br>
              +    public void setUp() throws Exception {<br>
              +        super.setUp();<br>
              +    }<br>
              +<br>
              +<br>
              +    /**<br>
              +     * Return the tests included in this test suite.<br>
              +     */<br>
              +    public static Test suite() {<br>
              +        return (new
              TestSuite(ProcessAsJspxTestCase.class));<br>
              +    }<br>
              +<br>
              +<br>
              +    /**<br>
              +     * Tear down instance variables required by this test
              case.<br>
              +     */<br>
              +    public void tearDown() {<br>
              +        super.tearDown();<br>
              +    }<br>
              +<br>
              +    private String getRawMarkup(String path) throws
              Exception {<br>
              +        URL url = getURL(path);<br>
              +        BufferedReader reader = new BufferedReader(new
              InputStreamReader(url.openStream()));<br>
              +        StringBuilder builder = new StringBuilder();<br>
              +        String cur;<br>
              +        while (null != (cur = reader.readLine())) {<br>
              +            builder.append(cur);<br>
              +        }<br>
              +<br>
              +        String xml = builder.toString();<br>
              +        return xml;<br>
              +    }<br>
              +<br>
              +    //
              ------------------------------------------------------------
              Test Methods<br>
              +<br>
              +    public void testProcessAsXhtml() throws Exception {<br>
              +<br>
              +        String xml =
              getRawMarkup(&quot;/faces/xhtmlview.xhtml&quot;);<br>
              +      
               assertTrue(XmlDeclaration.matcher(xml).matches());<br>
              +        assertTrue(XmlPI.matcher(xml).matches());<br>
              +        assertTrue(CDATASection.matcher(xml).matches());<br>
              +        assertTrue(EscapedText.matcher(xml).matches());<br>
              +        assertTrue(Comment.matcher(xml).matches());<br>
              +    }<br>
              +<br>
              +    public void testProcessAsXml() throws Exception {<br>
              +<br>
              +        String xml =
              getRawMarkup(&quot;/faces/xmlview.view.xml&quot;);<br>
              +      
               assertFalse(XmlDeclaration.matcher(xml).matches());<br>
              +        assertFalse(XmlPI.matcher(xml).matches());<br>
              +        assertFalse(CDATASection.matcher(xml).matches());<br>
              +        assertTrue(EscapedText.matcher(xml).matches());<br>
              +        assertFalse(Comment.matcher(xml).matches());<br>
              +    }<br>
              +<br>
              +    public void testProcessAsJspx() throws Exception {<br>
              +<br>
              +        String xml =
              getRawMarkup(&quot;/faces/jspxview.jspx&quot;);<br>
              +      
               assertFalse(XmlDeclaration.matcher(xml).matches());<br>
              +        assertFalse(XmlPI.matcher(xml).matches());<br>
              +        assertFalse(CDATASection.matcher(xml).matches());<br>
              +      
               assertTrue(NotEscapedText.matcher(xml).matches());<br>
              +        assertFalse(Comment.matcher(xml).matches());<br>
              +    }<br>
              +<br>
              +}<br>
              Index:
jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxBean.java<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxBean.java
              (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/src/java/com/sun/faces/systest/ProcessAsJspxBean.java
              (revision 0)<br>
              @@ -0,0 +1,14 @@<br>
              +package com.sun.faces.systest;<br>
              +<br>
              +import javax.faces.bean.ManagedBean;<br>
              +import javax.faces.bean.RequestScoped;<br>
              +<br>
              +@ManagedBean<br>
              +@RequestScoped<br>
              +public class ProcessAsJspxBean {<br>
              +<br>
              +    public String getProp() {<br>
              +       return &quot;Hello &lt; World&quot;;<br>
              +    }<br>
              +<br>
              +}<br>
              Index:
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspxview.jspx<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspxview.jspx
              (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspxview.jspx
              (revision 0)<br>
              @@ -0,0 +1,67 @@<br>
              +&lt;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&gt;<br>
              +&lt;!-- Copyright (c) 2008, 2010, Oracle and/or its
              affiliates. All rights reserved. --&gt;<br>
              +&lt;jsp:root xmlns=&quot;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&quot;<br>
              +          xmlns:jsp=&quot;<a href="http://java.sun.com/JSP/Page" target="_blank">http://java.sun.com/JSP/Page</a>&quot;<br>
              +          xmlns:f=&quot;<a href="http://java.sun.com/jsf/core" target="_blank">http://java.sun.com/jsf/core</a>&quot;<br>
              +          xmlns:h=&quot;<a href="http://java.sun.com/jsf/html" target="_blank">http://java.sun.com/jsf/html</a>&quot;<br>
              +          version=&quot;1.2&quot;&gt;<br>
              +  &lt;jsp:directive.page
              contentType=&quot;text/html;charset=utf-8&quot;/&gt;<br>
              +  &lt;f:view&gt;<br>
              +<br>
              +<br>
              +        &lt;f:attribute name=&quot;mode&quot; value=&quot;index&quot;/&gt;<br>
              +<br>
              +&lt;h2&gt;XML declaration: consumed&lt;/h2&gt;<br>
              +<br>
              +&lt;h2&gt;Processing instruction: consumed&lt;/h2&gt;<br>
              +<br>
              +&lt;?xml-stylesheet href=&quot;funky.xsl&quot; type=&quot;text/xml&quot;
              alternate=&quot;yes&quot;?&gt;<br>
              +<br>
              +&lt;h2&gt;CDATA section: consumed&lt;/h2&gt;<br>
              +<br>
              +&lt;![CDATA[ &lt;p&gt;This is CDATA&lt;/p&gt; ]]&gt;<br>
              +<br>
              +&lt;h2&gt;Inline text escaping: not escaped&lt;/h2&gt;<br>
              +<br>
              +<br>
              +                  &lt;code&gt;<br>
              +                    &lt;br/&gt;<br>
              +                    &amp;amp;lt;context-param&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-name&amp;amp;gt;javax.faces.PARTIAL_STATE_SAVING
              <br>
              +<br>
              +&amp;amp;lt;/param-name&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-value&amp;amp;gt;true&amp;amp;lt;/param-value&amp;amp;gt
              <br>
              +<br>
              +;<br>
              +                    &lt;br/&gt;<br>
              +                  
               &amp;amp;lt;/context-param&amp;amp;gt;<br>
              +                  &lt;/code&gt;<br>
              +<br>
              +&lt;h2&gt;Comments: consumed&lt;/h2&gt;<br>
              +<br>
              +<br>
              +&lt;p&gt;HTML Template Text&lt;/p&gt;<br>
              +<br>
              +<br>
              +<br>
              +&lt;p&gt;&lt;h:outputText
              value=&quot;#{processAsJspxBean.prop}&quot; /&gt;&lt;/p&gt;<br>
              +<br>
              +&lt;h:form prependId=&quot;false&quot;&gt;<br>
              +<br>
              +&lt;h:commandButton value=&quot;reload&quot; /&gt;<br>
              +<br>
              +&lt;/h:form&gt;<br>
              +<br>
              +<br>
              +&lt;!-- comments consumed --&gt;<br>
              +<br>
              +<br>
              +<br>
              +<br>
              +<br>
              +  &lt;/f:view&gt;<br>
              +&lt;/jsp:root&gt;<br>
              Index:
              jsf-ri/systest-per-webapp/process-as-jspx/web/xhtmlview.xhtml<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/web/xhtmlview.xhtml
              (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/web/xhtmlview.xhtml
              (revision 0)<br>
              @@ -0,0 +1,103 @@<br>
              +&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;
              ?&gt;<br>
              +&lt;!--<br>
              + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.<br>
              +<br>
              + Copyright 2009 Sun Microsystems, Inc. All rights
              reserved.<br>
              +<br>
              + The contents of this file are subject to the terms of
              either the GNU<br>
              + General Public License Version 2 only (&quot;GPL&quot;) or the
              Common Development<br>
              + and Distribution License(&quot;CDDL&quot;) (collectively, the
              &quot;License&quot;).  You<br>
              + may not use this file except in compliance with the
              License. You can obtain<br>
              + a copy of the License at <a href="https://glassfish.dev.java.net/public/CDDL+GPL.html" target="_blank">https://glassfish.dev.java.net/public/CDDL+GPL.html</a><br>
              + or glassfish/bootstrap/legal/LICENSE.txt.  See the
              License for the specific<br>
              + language governing permissions and limitations under the
              License.<br>
              +<br>
              + When distributing the software, include this License
              Header Notice in each<br>
              + file and include the License file at
              glassfish/bootstrap/legal/LICENSE.txt.<br>
              + Sun designates this particular file as subject to the
              &quot;Classpath&quot; exception<br>
              + as provided by Sun in the GPL Version 2 section of the
              License file that<br>
              + accompanied this code.  If applicable, add the following
              below the License<br>
              + Header, with the fields enclosed by brackets [] replaced
              by your own<br>
              + identifying information: &quot;Portions Copyrighted [year]<br>
              + [name of copyright owner]&quot;<br>
              +<br>
              + Contributor(s):<br>
              +<br>
              + If you wish your version of this file to be governed by
              only the CDDL or<br>
              + only the GPL Version 2, indicate your decision by adding
              &quot;[Contributor]<br>
              + elects to include this software in this distribution
              under the [CDDL or GPL<br>
              + Version 2] license.&quot;  If you don&#39;t indicate a single
              choice of license, a<br>
              + recipient has the option to distribute your version of
              this file under<br>
              + either the CDDL, the GPL Version 2 or to extend the
              choice of license to<br>
              + its licensees as provided above.  However, if you add
              GPL Version 2 code<br>
              + and therefore, elected the GPL Version 2 license, then
              the option applies<br>
              + only if the new code is made subject to such option by
              the copyright<br>
              + holder.<br>
              +--&gt;<br>
              +<br>
              +&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0
              Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>
              +&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&quot;<br>
              +      xmlns:h=&quot;<a href="http://java.sun.com/jsf/html" target="_blank">http://java.sun.com/jsf/html</a>&quot;&gt;<br>
              +&lt;h:head&gt;<br>
              +    &lt;title&gt;Process JSPX as Facelets for JSPX
              mode&lt;/title&gt;<br>
              +&lt;/h:head&gt;<br>
              +&lt;h:body bgcolor=&quot;white&quot;&gt;<br>
              +<br>
              +&lt;h2&gt;XML declaration: passed through&lt;/h2&gt;<br>
              +<br>
              +&lt;h2&gt;Processing instruction: passed
              through&lt;/h2&gt;<br>
              +<br>
              +&lt;?xml-stylesheet href=&quot;funky.xsl&quot; type=&quot;text/xml&quot;
              alternate=&quot;yes&quot;?&gt;<br>
              +<br>
              +&lt;h2&gt;CDATA section: passed through&lt;/h2&gt;<br>
              +<br>
              +&lt;![CDATA[ &lt;h2&gt;This is CDATA&lt;/h2&gt; ]]&gt;<br>
              +<br>
              +&lt;h2&gt;Inline text escaping: escaped&lt;/h2&gt;<br>
              +<br>
              +                  &lt;code&gt;<br>
              +                    &lt;br/&gt;<br>
              +                    &amp;amp;lt;context-param&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-name&amp;amp;gt;javax.faces.PARTIAL_STATE_SAVING
              <br>
              +<br>
              +&amp;amp;lt;/param-name&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-value&amp;amp;gt;true&amp;amp;lt;/param-value&amp;amp;gt
              <br>
              +<br>
              +;<br>
              +                    &lt;br/&gt;<br>
              +                  
               &amp;amp;lt;/context-param&amp;amp;gt;<br>
              +                  &lt;/code&gt;<br>
              +<br>
              +&lt;h2&gt;Comments: passed through&lt;/h2&gt;<br>
              +<br>
              +&lt;!-- comments pass through --&gt;<br>
              +<br>
              +&lt;hr /&gt;<br>
              +<br>
              +  &lt;h:form prependId=&quot;false&quot; id=&quot;form1&quot;&gt;<br>
              +<br>
              +   &lt;h:panelGrid columns=&quot;2&quot; border=&quot;1&quot; width=&quot;600&quot;&gt;<br>
              +<br>
              +     &lt;h:outputText value=&quot;column1&quot; /&gt;<br>
              +<br>
              +     &lt;h:outputText value=&quot;column2&quot; /&gt;<br>
              +<br>
              +   &lt;/h:panelGrid&gt;<br>
              +<br>
              +   &lt;h2&gt;&lt;h:messages id=&quot;messages&quot;/&gt;&lt;/h2&gt;<br>
              +<br>
              +<br>
              +<br>
              +   #{processAsJspxBean.prop}<br>
              +<br>
              +<br>
              +<br>
              +<br>
              +  &lt;/h:form&gt;<br>
              +<br>
              +&lt;/h:body&gt;<br>
              +&lt;/html&gt;<br>
              Index:
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspview.jsp<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspview.jsp
                (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/web/jspview.jsp
                (revision 0)<br>
              @@ -0,0 +1,86 @@<br>
              +&lt;%--<br>
              + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.<br>
              +<br>
              + Copyright 1997-2007 Sun Microsystems, Inc. All rights
              reserved.<br>
              +<br>
              + The contents of this file are subject to the terms of
              either the GNU<br>
              + General Public License Version 2 only (&quot;GPL&quot;) or the
              Common Development<br>
              + and Distribution License(&quot;CDDL&quot;) (collectively, the
              &quot;License&quot;).  You<br>
              + may not use this file except in compliance with the
              License. You can obtain<br>
              + a copy of the License at <a href="https://glassfish.dev.java.net/public/CDDL+GPL.html" target="_blank">https://glassfish.dev.java.net/public/CDDL+GPL.html</a><br>
              + or glassfish/bootstrap/legal/LICENSE.txt.  See the
              License for the specific<br>
              + language governing permissions and limitations under the
              License.<br>
              +<br>
              + When distributing the software, include this License
              Header Notice in each<br>
              + file and include the License file at
              glassfish/bootstrap/legal/LICENSE.txt.<br>
              + Sun designates this particular file as subject to the
              &quot;Classpath&quot; exception<br>
              + as provided by Sun in the GPL Version 2 section of the
              License file that<br>
              + accompanied this code.  If applicable, add the following
              below the License<br>
              + Header, with the fields enclosed by brackets [] replaced
              by your own<br>
              + identifying information: &quot;Portions Copyrighted [year]<br>
              + [name of copyright owner]&quot;<br>
              +<br>
              + Contributor(s):<br>
              +<br>
              + If you wish your version of this file to be governed by
              only the CDDL or<br>
              + only the GPL Version 2, indicate your decision by adding
              &quot;[Contributor]<br>
              + elects to include this software in this distribution
              under the [CDDL or GPL<br>
              + Version 2] license.&quot;  If you don&#39;t indicate a single
              choice of license, a<br>
              + recipient has the option to distribute your version of
              this file under<br>
              + either the CDDL, the GPL Version 2 or to extend the
              choice of license to<br>
              + its licensees as provided above.  However, if you add
              GPL Version 2 code<br>
              + and therefore, elected the GPL Version 2 license, then
              the option applies<br>
              + only if the new code is made subject to such option by
              the copyright<br>
              + holder.<br>
              +--%&gt;<br>
              +<br>
              +&lt;!--<br>
              + Copyright 2004 Sun Microsystems, Inc. All rights
              reserved.<br>
              + SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license
              terms.<br>
              +--&gt;<br>
              +<br>
              +&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01
              Transitional//EN&quot;&gt;<br>
              +&lt;html&gt;<br>
              +  &lt;head&gt;<br>
              +    &lt;title&gt;JSP view&lt;/title&gt;<br>
              +    &lt;%@ taglib uri=&quot;<a href="http://java.sun.com/jsf/core" target="_blank">http://java.sun.com/jsf/core</a>&quot;
               prefix=&quot;f&quot; %&gt;<br>
              +    &lt;%@ taglib uri=&quot;<a href="http://java.sun.com/jsf/html" target="_blank">http://java.sun.com/jsf/html</a>&quot;
               prefix=&quot;h&quot; %&gt;<br>
              +  &lt;/head&gt;<br>
              +<br>
              +  &lt;body&gt;<br>
              +&lt;f:view&gt;<br>
              +<br>
              +&lt;p&gt;HTML Template Text&lt;/p&gt;<br>
              +<br>
              +&lt;p&gt;&lt;h:outputText
              value=&quot;#{processAsJspxBean.prop}&quot; /&gt;&lt;/p&gt;<br>
              +<br>
              +&lt;h:form prependId=&quot;false&quot;&gt;<br>
              +<br>
              +&lt;h:commandButton value=&quot;reload&quot; /&gt;<br>
              +<br>
              +&lt;/h:form&gt;<br>
              +<br>
              +                  &lt;code&gt;<br>
              +                    &lt;br/&gt;<br>
              +                    &amp;amp;lt;context-param&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-name&amp;amp;gt;javax.faces.PARTIAL_STATE_SAVING
              <br>
              +<br>
              +&amp;amp;lt;/param-name&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-value&amp;amp;gt;true&amp;amp;lt;/param-value&amp;amp;gt
              <br>
              +<br>
              +;<br>
              +                    &lt;br/&gt;<br>
              +                  
               &amp;amp;lt;/context-param&amp;amp;gt;<br>
              +                  &lt;/code&gt;<br>
              +<br>
              +<br>
              +<br>
              +&lt;/f:view&gt;<br>
              +<br>
              +    &lt;hr&gt;<br>
              +  &lt;/body&gt;<br>
              +&lt;/html&gt;<br>
              Index:
              jsf-ri/systest-per-webapp/process-as-jspx/web/xmlview.view.xml<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/web/xmlview.view.xml
              (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/web/xmlview.view.xml
              (revision 0)<br>
              @@ -0,0 +1,103 @@<br>
              +&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
              +&lt;!--<br>
              + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.<br>
              +<br>
              + Copyright 2010 Sun Microsystems, Inc. All rights
              reserved.<br>
              +<br>
              + The contents of this file are subject to the terms of
              either the GNU<br>
              + General Public License Version 2 only (&quot;GPL&quot;) or the
              Common Development<br>
              + and Distribution License(&quot;CDDL&quot;) (collectively, the
              &quot;License&quot;).  You<br>
              + may not use this file except in compliance with the
              License. You can obtain<br>
              + a copy of the License at <a href="https://glassfish.dev.java.net/public/CDDL+GPL.html" target="_blank">https://glassfish.dev.java.net/public/CDDL+GPL.html</a><br>
              + or glassfish/bootstrap/legal/LICENSE.txt.  See the
              License for the specific<br>
              + language governing permissions and limitations under the
              License.<br>
              +<br>
              + When distributing the software, include this License
              Header Notice in each<br>
              + file and include the License file at
              glassfish/bootstrap/legal/LICENSE.txt.<br>
              + Sun designates this particular file as subject to the
              &quot;Classpath&quot; exception<br>
              + as provided by Sun in the GPL Version 2 section of the
              License file that<br>
              + accompanied this code.  If applicable, add the following
              below the License<br>
              + Header, with the fields enclosed by brackets [] replaced
              by your own<br>
              + identifying information: &quot;Portions Copyrighted [year]<br>
              + [name of copyright owner]&quot;<br>
              +<br>
              + Contributor(s):<br>
              +<br>
              + If you wish your version of this file to be governed by
              only the CDDL or<br>
              + only the GPL Version 2, indicate your decision by adding
              &quot;[Contributor]<br>
              + elects to include this software in this distribution
              under the [CDDL or GPL<br>
              + Version 2] license.&quot;  If you don&#39;t indicate a single
              choice of license, a<br>
              + recipient has the option to distribute your version of
              this file under<br>
              + either the CDDL, the GPL Version 2 or to extend the
              choice of license to<br>
              + its licensees as provided above.  However, if you add
              GPL Version 2 code<br>
              + and therefore, elected the GPL Version 2 license, then
              the option applies<br>
              + only if the new code is made subject to such option by
              the copyright<br>
              + holder.<br>
              +--&gt;<br>
              +&lt;faces-view xmlns=&quot;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&quot;<br>
              +            xmlns:h=&quot;<a href="http://java.sun.com/jsf/html" target="_blank">http://java.sun.com/jsf/html</a>&quot;&gt;<br>
              +<br>
              +    &lt;h:html&gt;<br>
              +<br>
              +        &lt;h:head&gt;&lt;h:title&gt;Raw XML
              View&lt;/h:title&gt;&lt;/h:head&gt;<br>
              +<br>
              +        &lt;h:body&gt;<br>
              +<br>
              +&lt;h2&gt;XML declaration: consumed&lt;/h2&gt;<br>
              +<br>
              +&lt;h2&gt;Processing instruction: consumed&lt;/h2&gt;<br>
              +<br>
              +&lt;?xml-stylesheet href=&quot;funky.xsl&quot; type=&quot;text/xml&quot;
              alternate=&quot;yes&quot;?&gt;<br>
              +<br>
              +&lt;h2&gt;CDATA section: consumed&lt;/h2&gt;<br>
              +<br>
              +&lt;![CDATA[ &lt;p&gt;This is CDATA&lt;/p&gt; ]]&gt;<br>
              +<br>
              +&lt;h2&gt;Inline text escaping: escaped&lt;/h2&gt;<br>
              +<br>
              +                  &lt;code&gt;<br>
              +                    &lt;br/&gt;<br>
              +                    &amp;amp;lt;context-param&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-name&amp;amp;gt;javax.faces.PARTIAL_STATE_SAVING
              <br>
              +<br>
              +&amp;amp;lt;/param-name&amp;amp;gt;<br>
              +                    &lt;br/&gt;<br>
              +<br>
              +&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;param-value&amp;amp;gt;true&amp;amp;lt;/param-value&amp;amp;gt
              <br>
              +<br>
              +;<br>
              +                    &lt;br/&gt;<br>
              +                  
               &amp;amp;lt;/context-param&amp;amp;gt;<br>
              +                  &lt;/code&gt;<br>
              +<br>
              +&lt;h2&gt;Comments: consumed&lt;/h2&gt;<br>
              +<br>
              +&lt;!-- comments consumed --&gt;<br>
              +<br>
              +            &lt;h:form prependId=&quot;false&quot; id=&quot;form&quot;&gt;<br>
              +<br>
              +                &lt;h:panelGrid id=&quot;grid&quot; column=&quot;2&quot;&gt;<br>
              +<br>
              +                    &lt;h:outputText id=&quot;text&quot;
              value=&quot;hello&quot;&gt;&lt;/h:outputText&gt;<br>
              +<br>
              +                    &lt;h:commandButton id=&quot;button&quot;
              value=&quot;reload&quot;&gt;&lt;/h:commandButton&gt;<br>
              +<br>
              +<br>
              +                &lt;/h:panelGrid&gt;<br>
              +<br>
              +   #{processAsJspxBean.prop}<br>
              +<br>
              +&lt;p&gt;html template text&lt;/p&gt;<br>
              +<br>
              +<br>
              +            &lt;/h:form&gt;<br>
              +<br>
              +        &lt;/h:body&gt;<br>
              +<br>
              +    &lt;/h:html&gt;<br>
              +<br>
              +&lt;/faces-view&gt;<br>
              +<br>
              +<br>
              Index:
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/faces-config.xml<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/faces-config.xml
              (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/faces-config.xml
              (revision 0)<br>
              @@ -0,0 +1,19 @@<br>
              +&lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39;?&gt;<br>
              +&lt;faces-config<br>
              +  xmlns=&quot;<a href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a>&quot;<br>
              +  xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
              +  xsi:schemaLocation=&quot;<a href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a>
              <a href="http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" target="_blank">http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd</a>&quot;<br>
              +  version=&quot;2.0&quot;&gt;<br>
              +<br>
              +  &lt;faces-config-extension&gt;<br>
              +    &lt;facelets-processing&gt;<br>
              +      &lt;file-extension&gt;.jspx&lt;/file-extension&gt;<br>
              +      &lt;process-as&gt;jspx&lt;/process-as&gt;<br>
              +    &lt;/facelets-processing&gt;<br>
              +    &lt;facelets-processing&gt;<br>
              +    
               &lt;file-extension&gt;.view.xml&lt;/file-extension&gt;<br>
              +      &lt;process-as&gt;xml&lt;/process-as&gt;<br>
              +    &lt;/facelets-processing&gt;<br>
              +  &lt;/faces-config-extension&gt;<br>
              +<br>
              +&lt;/faces-config&gt;<br>
              Index:
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/web.xml<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/web.xml
              (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/web/WEB-INF/web.xml
              (revision 0)<br>
              @@ -0,0 +1,72 @@<br>
              +&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;<br>
              +<br>
              +&lt;!--<br>
              + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.<br>
              +<br>
              + Copyright 1997-2007 Sun Microsystems, Inc. All rights
              reserved.<br>
              +<br>
              + The contents of this file are subject to the terms of
              either the GNU<br>
              + General Public License Version 2 only (&quot;GPL&quot;) or the
              Common Development<br>
              + and Distribution License(&quot;CDDL&quot;) (collectively, the
              &quot;License&quot;).  You<br>
              + may not use this file except in compliance with the
              License. You can obtain<br>
              + a copy of the License at <a href="https://glassfish.dev.java.net/public/CDDL+GPL.html" target="_blank">https://glassfish.dev.java.net/public/CDDL+GPL.html</a><br>
              + or glassfish/bootstrap/legal/LICENSE.txt.  See the
              License for the specific<br>
              + language governing permissions and limitations under the
              License.<br>
              +<br>
              + When distributing the software, include this License
              Header Notice in each<br>
              + file and include the License file at
              glassfish/bootstrap/legal/LICENSE.txt.<br>
              + Sun designates this particular file as subject to the
              &quot;Classpath&quot; exception<br>
              + as provided by Sun in the GPL Version 2 section of the
              License file that<br>
              + accompanied this code.  If applicable, add the following
              below the License<br>
              + Header, with the fields enclosed by brackets [] replaced
              by your own<br>
              + identifying information: &quot;Portions Copyrighted [year]<br>
              + [name of copyright owner]&quot;<br>
              +<br>
              + Contributor(s):<br>
              +<br>
              + If you wish your version of this file to be governed by
              only the CDDL or<br>
              + only the GPL Version 2, indicate your decision by adding
              &quot;[Contributor]<br>
              + elects to include this software in this distribution
              under the [CDDL or GPL<br>
              + Version 2] license.&quot;  If you don&#39;t indicate a single
              choice of license, a<br>
              + recipient has the option to distribute your version of
              this file under<br>
              + either the CDDL, the GPL Version 2 or to extend the
              choice of license to<br>
              + its licensees as provided above.  However, if you add
              GPL Version 2 code<br>
              + and therefore, elected the GPL Version 2 license, then
              the option applies<br>
              + only if the new code is made subject to such option by
              the copyright<br>
              + holder.<br>
              +--&gt;<br>
              +<br>
              +&lt;web-app version=&quot;2.5&quot;<br>
              +         xmlns=&quot;<a href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a>&quot;<br>
              +         xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
              +         xsi:schemaLocation=&quot;<a href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a>
              <a href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" target="_blank">http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd</a>&quot;&gt;<br>
              +<br>
              +    &lt;description&gt;<br>
              +       JSPX Compatibility<br>
              +    &lt;/description&gt;<br>
              +    &lt;display-name&gt;JSPX
              Compatibility&lt;/display-name&gt;<br>
              +<br>
              +    &lt;context-param&gt;<br>
              +      
               &lt;param-name&gt;javax.faces.FACELETS_VIEW_MAPPINGS&lt;/param-name&gt;<br>
              +      
               &lt;param-value&gt;*.xhtml;*.view.xml;*.jspx&lt;/param-value&gt;<br>
              +    &lt;/context-param&gt;<br>
              +<br>
              +    &lt;context-param&gt;<br>
              +      
               &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;<br>
              +        &lt;param-value&gt;.xhtml .view.xml .jsp
              .jspx&lt;/param-value&gt;<br>
              +    &lt;/context-param&gt;<br>
              +<br>
              +    &lt;!-- Faces Servlet --&gt;<br>
              +    &lt;servlet&gt;<br>
              +        &lt;servlet-name&gt;Faces
              Servlet&lt;/servlet-name&gt;<br>
              +      
 &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;<br>
              +        &lt;load-on-startup&gt; 1
              &lt;/load-on-startup&gt;<br>
              +    &lt;/servlet&gt;<br>
              +<br>
              +    &lt;!-- Faces Servlet Mapping --&gt;<br>
              +    &lt;servlet-mapping&gt;<br>
              +        &lt;servlet-name&gt;Faces
              Servlet&lt;/servlet-name&gt;<br>
              +        &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;<br>
              +    &lt;/servlet-mapping&gt;<br>
              +<br>
              +&lt;/web-app&gt;<br>
              Index:
              jsf-ri/systest-per-webapp/process-as-jspx/web/index.html<br>
===================================================================<br>
              ---
              jsf-ri/systest-per-webapp/process-as-jspx/web/index.html  
               (revision 0)<br>
              +++
              jsf-ri/systest-per-webapp/process-as-jspx/web/index.html  
               (revision 0)<br>
              @@ -0,0 +1,124 @@<br>
              +&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01
              Transitional//EN&quot;&gt;<br>
              +&lt;html&gt;<br>
              +  &lt;head&gt;<br>
              +    &lt;title&gt;Test all permutations of facelets
              processing modes&lt;/title&gt;<br>
              +  &lt;/head&gt;<br>
              +<br>
              +  &lt;body&gt;<br>
              +    &lt;h1&gt;Test all permutations of facelets
              processing modes&lt;/h1&gt;<br>
              +<br>
              +&lt;table border=&quot;1&quot;&gt;<br>
              +<br>
              +&lt;tr&gt;<br>
              +<br>
              +&lt;td&gt;&amp;nbsp;<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;th&gt;xhtml<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;th&gt;xml<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;th&gt;jspx<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;/tr&gt;<br>
              +<br>
              +&lt;tr&gt;<br>
              +<br>
              +&lt;th&gt;XML Declaration<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;td&gt;passed through<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;/tr&gt;<br>
              +<br>
              +&lt;tr&gt;<br>
              +<br>
              +&lt;th&gt;Processing Instructions<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;td&gt;passed through<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;/tr&gt;<br>
              +<br>
              +&lt;tr&gt;<br>
              +<br>
              +&lt;th&gt;CDATA<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;td&gt;passed through<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;/tr&gt;<br>
              +<br>
              +&lt;tr&gt;<br>
              +<br>
              +&lt;th&gt;Inline text escaping<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;td&gt;escaped<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;escaped<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;not escaped<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;/tr&gt;<br>
              +<br>
              +&lt;tr&gt;<br>
              +<br>
              +&lt;th&gt;Comments<br>
              +&lt;/th&gt;<br>
              +<br>
              +&lt;td&gt;passed through<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;td&gt;consumed<br>
              +&lt;/td&gt;<br>
              +<br>
              +&lt;/tr&gt;<br>
              +<br>
              +<br>
              +&lt;/table&gt;<br>
              +<br>
              +<br>
              +<br>
              +&lt;p&gt;&lt;a
              href=&quot;/jsf-process-as-jspx/faces/xhtmlview.xhtml&quot;&gt;Classic
              Facelets processed as Facelets in XHTML
              mode&lt;/a&gt;&lt;/p&gt;<br>
              +&lt;p&gt;&lt;a
              href=&quot;/jsf-process-as-jspx/faces/xmlview.view.xml&quot;&gt;XML
              processed as Facelets in XML mode&lt;/a&gt;&lt;/p&gt;<br>
              +&lt;p&gt;&lt;a
              href=&quot;/jsf-process-as-jspx/faces/jspxview.jspx&quot;&gt;JSPX
              processed as Facelets in JSPX mode&lt;/a&gt;&lt;/p&gt;<br>
              +&lt;p&gt;&lt;a
              href=&quot;/jsf-process-as-jspx/faces/jspview.jsp&quot;&gt;JSP
              processed as JSP&lt;/a&gt;&lt;/p&gt;<br>
              +<br>
              +    &lt;hr&gt;<br>
              +&lt;!-- Created: Wed Sep 29 12:17:11 EDT 2010 --&gt;<br>
              +&lt;!-- hhmts start --&gt;<br>
              +Last modified: Thu Sep 30 17:01:18 EDT 2010<br>
              +&lt;!-- hhmts end --&gt;<br>
              +  &lt;/body&gt;<br>
              +&lt;/html&gt;<br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div><br>