You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new documentation from the wiki.
Add links to new documentation in the settings section of `package.json`
Links between document pages are replaced during runtime so that
they work property with vscode.
Closes#328
Signed-off-by: David Thompson <davthomp@redhat.com>
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,14 +59,14 @@ The following settings are supported:
59
59
*`xml.format.enabled` : Enable/disable ability to format document. Default is `true`.
60
60
*`xml.format.emptyElements` : Expand/collapse empty elements. Default is `ignore`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatemptyelements) for more information.
61
61
*`xml.format.enforceQuoteStyle`: Enforce `preferred` quote style (set by `xml.preferences.quoteStyle`) or `ignore` quote style when formatting. Default is `ignore`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatenforcequotestyle) for more information.
62
-
*`xml.format.joinCDATALines` : Set to `true` to join lines in CDATA content during formatting. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatjoincdatalines-) for more information.
63
-
*`xml.format.joinCommentLines` : Set to `true` to join lines in comments during formatting. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatjoincommentlines-) for more information.
62
+
*`xml.format.joinCDATALines` : Set to `true` to join lines in CDATA content during formatting. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatjoincdatalines) for more information.
63
+
*`xml.format.joinCommentLines` : Set to `true` to join lines in comments during formatting. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatjoincommentlines) for more information.
64
64
*`xml.format.joinContentLines` : Normalize the whitespace of content inside an element. Newlines and excess whitespace are removed. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatjoincontentlines) for more information.
65
65
*`xml.format.preserveAttributeLineBreaks`: Preserve line breaks that appear before and after attributes. This setting is overridden if `xml.format.splitAttributes` is set to `true`. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatpreserveattributelinebreaks) for more information.
66
-
*`xml.format.preserveEmptyContent`: Preserve empty content/whitespace in a tag. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatpreserveemptycontent-) for more information.
66
+
*`xml.format.preserveEmptyContent`: Preserve empty content/whitespace in a tag. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatpreserveemptycontent) for more information.
67
67
*`xml.format.preservedNewLines`: Preserve new lines that separate tags. The value represents the maximum number of new lines per section. A value of 0 removes all new lines. Default is `2`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatpreservednewlines) for more information.
68
-
*`xml.format.spaceBeforeEmptyCloseTag`: Insert space before end of self closing tag. \nExample:\n ```<tag/> -> <tag />```. Default is `true`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatspacebeforeemptyclosetag-) for more information.
69
-
*`xml.format.splitAttributes` : Split multiple attributes each onto a new line. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatsplitattributes-) for more information.
68
+
*`xml.format.spaceBeforeEmptyCloseTag`: Insert space before end of self closing tag. \nExample:\n ```<tag/> -> <tag />```. Default is `true`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatspacebeforeemptyclosetag) for more information.
69
+
*`xml.format.splitAttributes` : Split multiple attributes each onto a new line. Default is `false`. See [here](https://github.com/redhat-developer/vscode-xml/wiki/Formatting#xmlformatsplitattributes) for more information.
70
70
*`xml.preferences.quoteStyle`: Preferred quote style to use for completion: `single` quotes, `double` quotes. Default is `double`.
71
71
*`xml.autoCloseTags.enabled` : Enable/disable autoclosing of XML tags. Default is `true`. \n\nIMPORTANT: Turn off `#editor.autoClosingTags#` for this to work.
72
72
**Note**: `editor.autoClosingBrackets` must be turned off to work.
Code lens is provided in `.dtd` files to show where elements defined in the DTD are referenced.
7
+
For instance, in the following code:
8
+
9
+
```xml
10
+
<!ELEMENT letter (to, from, title, body)>
11
+
<!ELEMENT to (#PCDATA)>
12
+
<!ELEMENT from (#PCDATA)>
13
+
<!ELEMENT title (#PCDATA)>
14
+
<!ELEMENT body (#PCDATA)>
15
+
```
16
+
17
+
There will be a code lens entry after the first line that points from the
18
+
definition of the element `to` to where it is used in the definition of the
19
+
element `letter`.
20
+
21
+
Here is a demonstration of the above Code Lens:
22
+
23
+

24
+
25
+
### XSD Features
26
+
27
+
Code lens is also provided in `.xsd` files. It shows where top level types
28
+
and elements are referenced. For instance, in the following code:
29
+
30
+
```xml
31
+
<?xml version="1.0" encoding="UTF-8"?>
32
+
<xs:schema
33
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
34
+
targetNamespace="http://example.org/my-example"
35
+
xmlns:NS="http://example.org/my-example">
36
+
<xs:element
37
+
name="root-element"
38
+
type="NS:yell" />
39
+
<xs:simpleTypename='yell'>
40
+
<xs:restrictionbase='xs:string'>
41
+
<xs:patternvalue='[A-Z]+!'></xs:pattern>
42
+
</xs:restriction>
43
+
</xs:simpleType>
44
+
</xs:schema>
45
+
```
46
+
47
+
There will be a code lens above the line where the `yell` type is defined
48
+
that points to where it is referenced when defining the `root-element` element.
49
+
50
+
Here is a demonstration of the above Code Lens:
51
+
52
+

53
+
54
+
Here is a demonstration of the code lens for `xs:element`:
55
+
56
+

0 commit comments