Skip to content

Commit

Permalink
Add documentation, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiyotoko committed Apr 5, 2024
1 parent e2c107a commit 174bfa8
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 34 deletions.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# eaw-xml-schema
<h1 align=center>EaW XML Schema</h1>

<p align=center>
<img src="shields.io/">
</p>

Defines common xml schemas for Empire at War modding.

## Idea

XML schemas are used to define and document elements. This project contains multiple schemas for different xml data structures in the game Star Wars: Empire at War. These should help new people to find their way around. As there is not much information easily available online outside of the wiki, these can be particularly helpful for elements that are not self-explanatory.

## Usage

At the root of your element, add the following attributes:

```xml
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA% https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA%.xsd">
...
</root>
```

Note: Replace `%SCHEMA%` with the name of the schema you need (see below for a selection).

## List of schemas

This is a list of all xml schemas that currently exist. More schemas will be added in the future.

- [Ground](schemas/ground.xsd)
- [Hardpoints](schemas/hardpoints.xsd)
- [Planets](schemas/planets.xsd)
- [Projectiles](schemas/projectiles.xsd)
- [Space](schemas/space.xsd)
- [Starbases](schemas/starbases.xsd)
- [Trade Routes](schemas/trades.xsd)
- [Upgrades](schemas/upgrades.xsd)
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
<meta charset="UTF-8">
</head>
<body>
<h1>EaW XML Schemas</h1>
<h2>Installation</h2>
<p>At the root of your element, add the following code:</p>
<h1 align="center">EaW XML Schemas</h1>
<h2>Idea</h2>
<p>XML schemas are used to define and document elements. This project contains multiple schemas for different xml data structures in the game Star Wars: Empire at War. These should help new people to find their way around. As there is not much information easily available online outside of the wiki, these can be particularly helpful for elements that are not self-explanatory.</p>
<h2>Usage</h2>
<p>At the root of your element, add the following attributes:</p>
<code><span style="color:blue">xmlns:xsi</span>=<span style="color: green">"http://www.w3.org/2001/XMLSchema"</span> <span style="color:blue">xsi:schemaLocation</span>=<span style="color: green">"https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA% https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA%.xsd"</span></code>
<p>
<button onclick="copy()">Copy text</button>
Expand Down
Loading

0 comments on commit 174bfa8

Please sign in to comment.