bundles/org.apache.jasper.glassfish/src/org/apache/jasper/xmlparser/XMLEncodingDetector.java
private void scanXMLDeclOrTextDecl(boolean scanningTextDecl) 
        throws IOException, JasperException {

        // scan decl
        scanXMLDeclOrTextDecl(scanningTextDecl, fStrings);
        fMarkupDepth--;

        // pseudo-attribute values
        String encodingPseudoAttr = fStrings[1];

        // set encoding on reader
        if (encodingPseudoAttr != null) {
            isEncodingSetInProlog = true;
	    encoding = encodingPseudoAttr;
        }
    }
private void scanXMLDeclOrTextDecl(boolean scanningTextDecl) 
        throws IOException, JasperException {

        // scan decl
        scanXMLDeclOrTextDecl(scanningTextDecl, fStrings);
        fMarkupDepth--;

        // pseudo-attribute values
        String encodingPseudoAttr = fStrings[1];

        // set encoding on reader
        if (encodingPseudoAttr != null) {
            isEncodingSetInProlog = true;
	    encoding = encodingPseudoAttr;
        }
    }
private void scanXMLDeclOrTextDecl ( boolean scanningTextDecl ) throws IOException , JasperException { // scan decl scanXMLDeclOrTextDecl ( scanningTextDecl , fStrings ) ; fMarkupDepth -- ; // pseudo-attribute values String encodingPseudoAttr = fStrings [ 1 ] ; // set encoding on reader if ( encodingPseudoAttr != null ) { isEncodingSetInProlog = true ; encoding = encodingPseudoAttr ; } }
Scans an XML or text declaration.
<p>
<pre>
[23] XMLDecl ::= '&lt;?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
[24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
[80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' |  "'" EncName "'" )
[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
[32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'")
| ('"' ('yes' | 'no') '"'))

[77] TextDecl ::= '&lt;?xml' VersionInfo? EncodingDecl S? '?>'
</pre>

@param scanningTextDecl True if a text declaration is to
be scanned instead of an XML
declaration.
Scans an XML or text declaration . <p > <pre > [ 23 ] XMLDecl :: = &lt ; ?xml VersionInfo EncodingDecl? SDDecl? S? ? > [ 24 ] VersionInfo :: = S version Eq ( VersionNum | VersionNum ) [ 80 ] EncodingDecl :: = S encoding Eq ( EncName | EncName ) [ 81 ] EncName :: = [ A - Za - z ] ( [ A - Za - z0 - 9 . _ ] | - ) * [ 32 ] SDDecl :: = S standalone Eq (( ( yes | no ) ) | ( ( yes | no ) ))