Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add position check for XML declaration #162

Merged
merged 1 commit into from
Jul 7, 2024

Commits on Jul 7, 2024

  1. Add position check for XML declaration

    ## Why?
    XML declaration must be the first item.
    
    https://www.w3.org/TR/2006/REC-xml11-20060816/#document
    
    ```
    [1]   document   ::=   ( prolog element Misc* ) - ( Char* RestrictedChar Char* )
    ```
    
    https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-prolog
    
    ```
    [22]   prolog   ::=   	XMLDecl Misc* (doctypedecl Misc*)?
    ```
    
    https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-XMLDecl
    
    ```
    [23]   XMLDecl  ::=   '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
    ```
    
    See: ruby#161 (comment)
    naitoh committed Jul 7, 2024
    Configuration menu
    Copy the full SHA
    53dd46c View commit details
    Browse the repository at this point in the history