Skip to content

Commit 07b2718

Browse files
committed
Improving the xml syntax
1 parent 7183fe1 commit 07b2718

4 files changed

Lines changed: 23 additions & 23 deletions

File tree

spml/src/main/resources/110-java-maven-best-practices.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<examples>
2929
<toc auto-generate="true" />
30-
<example-section number="1" id="effective-dependency-management">
30+
<example number="1" id="effective-dependency-management">
3131
<example-header>
3232
<example-title>Effective Dependency Management</example-title>
3333
<example-subtitle>Manage Dependencies Effectively using `dependencyManagement` and BOMs</example-subtitle>
@@ -129,9 +129,9 @@
129129
]]></code-block>
130130
</bad-example>
131131
</code-examples>
132-
</example-section>
132+
</example>
133133

134-
<example-section number="2" id="standard-directory-layout">
134+
<example number="2" id="standard-directory-layout">
135135
<example-header>
136136
<example-title>Standard Directory Layout</example-title>
137137
<example-subtitle>Adhere to the Standard Directory Layout</example-subtitle>
@@ -173,9 +173,9 @@ my-app/
173173
]]></code-block>
174174
</bad-example>
175175
</code-examples>
176-
</example-section>
176+
</example>
177177

178-
<example-section number="3" id="plugin-management">
178+
<example number="3" id="plugin-management">
179179
<example-header>
180180
<example-title>Plugin Management and Configuration</example-title>
181181
<example-subtitle>Manage Plugin Versions and Configurations Centrally</example-subtitle>
@@ -245,9 +245,9 @@ my-app/
245245
]]></code-block>
246246
</bad-example>
247247
</code-examples>
248-
</example-section>
248+
</example>
249249

250-
<example-section number="4" id="build-profiles">
250+
<example number="4" id="build-profiles">
251251
<example-header>
252252
<example-title>Use Build Profiles for Environment-Specific Configurations</example-title>
253253
<example-subtitle>Employ Build Profiles for Environment-Specific Settings</example-subtitle>
@@ -317,9 +317,9 @@ my-app/
317317
]]></code-block>
318318
</bad-example>
319319
</code-examples>
320-
</example-section>
320+
</example>
321321

322-
<example-section number="5" id="readable-poms">
322+
<example number="5" id="readable-poms">
323323
<example-header>
324324
<example-title>Keep POMs Readable and Maintainable</example-title>
325325
<example-subtitle>Structure POMs Logically for Readability</example-subtitle>
@@ -408,9 +408,9 @@ my-app/
408408
]]></code-block>
409409
</bad-example>
410410
</code-examples>
411-
</example-section>
411+
</example>
412412

413-
<example-section number="6" id="manage-repositories">
413+
<example number="6" id="manage-repositories">
414414
<example-header>
415415
<example-title>Manage Repositories Explicitly</example-title>
416416
<example-subtitle>Declare Custom Repositories Explicitly and Minimize Their Use</example-subtitle>
@@ -460,9 +460,9 @@ my-app/
460460
]]></code-block>
461461
</bad-example>
462462
</code-examples>
463-
</example-section>
463+
</example>
464464

465-
<example-section number="7" id="centralize-version-management">
465+
<example number="7" id="centralize-version-management">
466466
<example-header>
467467
<example-title>Centralize Version Management with Properties</example-title>
468468
<example-subtitle>Use Properties to Manage Dependency and Plugin Versions</example-subtitle>
@@ -620,7 +620,7 @@ my-app/
620620
]]></code-block>
621621
</bad-example>
622622
</code-examples>
623-
</example-section>
623+
</example>
624624
</examples>
625625

626626
<output-requirements-section>

spml/src/main/resources/cursor-rule-generator-1.1.xsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
33
<xsl:output method="text" encoding="UTF-8"/>
4-
<xsl:strip-space elements="prompt metadata tags example-section code-examples good-example bad-example question-section workflow-section template-section instruction-section output-requirements-section"/>
4+
<xsl:strip-space elements="prompt metadata tags example code-examples good-example bad-example question-section workflow-section template-section instruction-section output-requirements-section"/>
55

66
<xsl:template match="/prompt">
77
<!-- Common frontmatter and header -->
@@ -38,7 +38,7 @@ alwaysApply: </xsl:text><xsl:value-of select="normalize-space(metadata/cursor-ai
3838
### Table of contents
3939

4040
</xsl:text>
41-
<xsl:for-each select="examples/example-section">
41+
<xsl:for-each select="examples/example">
4242
<xsl:text>- Example </xsl:text><xsl:value-of select="@number"/><xsl:text>: </xsl:text><xsl:value-of select="normalize-space(example-header/example-title)"/>
4343
<xsl:text>
4444
</xsl:text>
@@ -51,11 +51,11 @@ alwaysApply: </xsl:text><xsl:value-of select="normalize-space(metadata/cursor-ai
5151

5252
<!-- Examples container template -->
5353
<xsl:template match="examples">
54-
<xsl:apply-templates select="example-section"/>
54+
<xsl:apply-templates select="example"/>
5555
</xsl:template>
5656

5757
<!-- Example section template -->
58-
<xsl:template match="example-section">
58+
<xsl:template match="example">
5959
<xsl:text>
6060
### Example </xsl:text><xsl:value-of select="@number"/><xsl:text>: </xsl:text><xsl:value-of select="normalize-space(example-header/example-title)"/>
6161
<xsl:text>

spml/src/main/resources/spml-1.1.xsd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<xs:complexType>
7272
<xs:sequence>
7373
<xs:element ref="toc" minOccurs="0"/>
74-
<xs:element ref="example-section" minOccurs="0" maxOccurs="unbounded"/>
74+
<xs:element ref="example" minOccurs="0" maxOccurs="unbounded"/>
7575
</xs:sequence>
7676
</xs:complexType>
7777
</xs:element>
@@ -102,7 +102,7 @@
102102
<xs:element name="content-sections">
103103
<xs:complexType>
104104
<xs:choice minOccurs="0" maxOccurs="unbounded">
105-
<xs:element ref="example-section"/>
105+
<xs:element ref="example"/>
106106
<xs:element ref="question-section"/>
107107
<xs:element ref="template-section"/>
108108
<xs:element ref="workflow-section"/>
@@ -580,7 +580,7 @@
580580
</xs:element>
581581

582582
<!-- Example section -->
583-
<xs:element name="example-section">
583+
<xs:element name="example">
584584
<xs:complexType>
585585
<xs:sequence>
586586
<xs:element ref="example-header"/>

spml/src/main/resources/spml.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
<xs:element ref="workflow-section"/>
125125
<xs:element ref="instruction-section"/>
126126
<xs:element ref="output-requirements-section"/>
127-
<xs:element ref="example-section"/>
127+
<xs:element ref="example"/>
128128
<xs:element ref="reference-section"/>
129129
</xs:choice>
130130
</xs:complexType>
@@ -701,7 +701,7 @@
701701
</xs:element>
702702

703703
<!-- Example section -->
704-
<xs:element name="example-section">
704+
<xs:element name="example">
705705
<xs:complexType>
706706
<xs:sequence>
707707
<xs:element ref="example-header"/>

0 commit comments

Comments
 (0)