--- 
name: XML
fileTypes: 
- xml
- tld
- jsp
- pt
- cpt
- dtml
- rss
- opml
scopeName: text.xml
repository: 
  tagStuff: 
    patterns: 
    - captures: 
        "1": 
          name: entity.other.attribute-name.namespace.xml
        "2": 
          name: entity.other.attribute-name.xml
        "3": 
          name: punctuation.separator.namespace.xml
        "4": 
          name: entity.other.attribute-name.localname.xml
      match: " (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)="
    - include: "#doublequotedString"
    - include: "#singlequotedString"
  singlequotedString: 
    name: string.quoted.single.xml
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.xml
    begin: "'"
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.xml
    end: "'"
  doublequotedString: 
    name: string.quoted.double.xml
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.xml
    begin: "\""
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.xml
    end: "\""
uuid: D3C4E6DA-6B1C-11D9-8CC2-000D93589AF6
foldingStartMarker: ^\s*(<[^!?%/](?!.+?(/>|</.+?>))|<[!%]--(?!.+?--%?>)|<%[!]?(?!.+?%>))
patterns: 
- name: meta.tag.preprocessor.xml
  captures: 
    "1": 
      name: punctuation.definition.tag.xml
    "2": 
      name: entity.name.tag.xml
  begin: (<\?)\s*([-_a-zA-Z0-9]+)
  end: (\?>)
  patterns: 
  - name: entity.other.attribute-name.xml
    match: " ([a-zA-Z-]+)"
  - include: "#doublequotedString"
  - include: "#singlequotedString"
- name: meta.tag.sgml.doctype.xml
  captures: 
    "1": 
      name: punctuation.definition.tag.xml
    "2": 
      name: entity.name.tag.doctype.xml
  begin: (<!)(DOCTYPE)
  end: (>)
  patterns: 
  - captures: 
      "1": 
        name: punctuation.definition.tag.xml
      "2": 
        name: entity.name.tag.entity.xml
      "3": 
        name: meta.entity.xml
    begin: (<!)(ENTITY)\s([-_a-zA-Z0-9]+)
    end: (>)
    patterns: 
    - include: "#doublequotedString"
    - include: "#singlequotedString"
- name: comment.block.xml
  captures: 
    "0": 
      name: punctuation.definition.comment.xml
  begin: <[!%]--
  end: --%?>
- name: meta.tag.no-content.xml
  endCaptures: 
    "6": 
      name: entity.name.tag.localname.xml
    "7": 
      name: punctuation.definition.tag.xml
    "1": 
      name: punctuation.definition.tag.xml
    "2": 
      name: meta.scope.between-tag-pair.xml
    "3": 
      name: entity.name.tag.namespace.xml
    "4": 
      name: entity.name.tag.xml
    "5": 
      name: punctuation.separator.namespace.xml
  begin: (<)((?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+))(?=(\s[^>]*)?></\2>)
  beginCaptures: 
    "6": 
      name: entity.name.tag.localname.xml
    "1": 
      name: punctuation.definition.tag.xml
    "3": 
      name: entity.name.tag.namespace.xml
    "4": 
      name: entity.name.tag.xml
    "5": 
      name: punctuation.separator.namespace.xml
  end: (>(<))/(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)(>)
  patterns: 
  - include: "#tagStuff"
- name: meta.tag.xml
  captures: 
    "1": 
      name: punctuation.definition.tag.xml
    "2": 
      name: entity.name.tag.namespace.xml
    "3": 
      name: entity.name.tag.xml
    "4": 
      name: punctuation.separator.namespace.xml
    "5": 
      name: entity.name.tag.localname.xml
  begin: (</?)(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)
  end: (/?>)
  patterns: 
  - include: "#tagStuff"
- name: constant.character.entity.xml
  captures: 
    "1": 
      name: punctuation.definition.constant.xml
    "3": 
      name: punctuation.definition.constant.xml
  match: (&)([a-zA-Z0-9_-]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
- name: invalid.illegal.bad-ampersand.xml
  match: "&"
- name: source.java-props.embedded.xml
  endCaptures: 
    "0": 
      name: punctuation.section.embedded.end.xml
  begin: <%@
  beginCaptures: 
    "0": 
      name: punctuation.section.embedded.begin.xml
  end: "%>"
  patterns: 
  - name: keyword.other.page-props.xml
    match: page|include|taglib
- name: source.java.embedded.xml
  endCaptures: 
    "0": 
      name: punctuation.section.embedded.end.xml
  begin: <%[!=]?(?!--)
  beginCaptures: 
    "0": 
      name: punctuation.section.embedded.begin.xml
  end: (?!--)%>
  patterns: 
  - include: source.java
- name: string.unquoted.cdata.xml
  endCaptures: 
    "0": 
      name: punctuation.definition.string.end.xml
  begin: <!\[CDATA\[
  beginCaptures: 
    "0": 
      name: punctuation.definition.string.begin.xml
  end: "]]>"
foldingStopMarker: ^\s*(</[^>]+>|[/%]>|-->)\s*$
keyEquivalent: ^~X
