forked from eclipse-lemminx/lemminx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes indentation issue for schema based attributes
Fixes eclipse-lemminx#188 The issue was that when adding attributes it needed to know before hand how many attributes would be added to know which add attribute method should be called. .isRequired() was messing this up and was moved outside to determine the total variables being added before the add attribute methods were called. Signed-off-by: Nikolas Komonen <[email protected]>
- Loading branch information
1 parent
2d79d8a
commit 93d2802
Showing
3 changed files
with
57 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
org.eclipse.lsp4xml/src/test/resources/xsd/simpleAttribute.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsd:schema | ||
elementFormDefault="qualified" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<xsd:element | ||
name="invoice" | ||
type="invoiceType"></xsd:element> | ||
<xsd:complexType name="invoiceType"> | ||
<xsd:annotation> | ||
<xsd:documentation>An invoice type...</xsd:documentation> | ||
</xsd:annotation> | ||
<xsd:sequence> | ||
<xsd:element | ||
name="product" | ||
type="productType"></xsd:element> | ||
</xsd:sequence> | ||
</xsd:complexType> | ||
|
||
|
||
<xsd:complexType name="productType"> | ||
<xsd:attribute | ||
name="description" | ||
type="xsd:string" | ||
use="required"></xsd:attribute> | ||
</xsd:complexType> | ||
|
||
</xsd:schema> |