Template:XML Reference: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Added Template:References to "see also" section) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#switch:{{{1}}} | <includeonly>{{#switch:{{{1}}} | ||
| object = {{#tag: ref | <code>ObjectBlueprints.xml</code>{{#if: {{{2 |}}} |, object name <code>{{{2}}}</code> |}} | name={{{{{{ | | object = {{#tag: ref | <code>ObjectBlueprints.xml</code>{{#if: {{{2 |}}} |, object name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | ||
| population = {{#tag: ref | <code>PopulationTables.xml</code>{{#if: {{{2 |}}} |, population name <code>{{{2}}}</code> |}} | name={{{{{{ | | population = {{#tag: ref | <code>PopulationTables.xml</code>{{#if: {{{2 |}}} |, population name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | ||
| encounter = {{#tag: ref | <code>EncounterTables.xml</code>{{#if: {{{2 |}}} |, encountertable name <code>{{{2}}}</code> |}} | name={{{{{{ | | pop= {{#tag: ref | <code>PopulationTables.xml</code>{{#if: {{{2 |}}} |, population name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | ||
| | | encountertable = {{#tag: ref | <code>EncounterTables.xml</code>{{#if: {{{2 |}}} |, encountertable name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | ||
}}</includeonly><noinclude>{ | | encounter = {{#tag: ref | <code>EncounterTables.xml</code>{{#if: {{{2 |}}} |, encountertable name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | ||
| body = {{#tag: ref | <code>Bodies.xml</code>{{#if: {{{2 |}}} |, anatomy name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| conversation = {{#tag: ref | <code>Conversations.xml</code>{{#if: {{{2 |}}} |, conversation ID <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| convo = {{#tag: ref | <code>Conversations.xml</code>{{#if: {{{2 |}}} |, conversation ID <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| faction = {{#tag: ref | <code>Factions.xml</code>{{#if: {{{2 |}}} |, faction name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| quest = {{#tag: ref | <code>Quests.xml</code>{{#if: {{{2 |}}} |, quest name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| world = {{#tag: ref | <code>Worlds.xml</code>{{#if: {{{2 |}}} |, cell name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| zonetemplate = {{#tag: ref | <code>ZoneTemplates.xml</code>{{#if: {{{2 |}}} |, zonetemplate name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| zone = {{#tag: ref | <code>ZoneTemplates.xml</code>{{#if: {{{2 |}}} |, zonetemplate name <code>{{{2}}}</code> |}} | name={{#if: {{{2 |}}} |{{{2}}} |{{{1}}}}}}} | |||
| {{Template Error}} | |||
}}</includeonly><noinclude>This template can be used to reference specific XML files and their contents. | |||
{|class="wikitable" | |||
! Parameter | |||
! Result | |||
! Sub-unit | |||
|- | |||
| <code>object</code> | |||
| <code>ObjectBlueprints.xml</code> | |||
| object name | |||
|- | |||
| <code>population</code> or <code>pop</code> | |||
| <code>PopulationTables.xml</code> | |||
| population name | |||
|- | |||
| <code>encountertable</code> or <code>encounter</code> | |||
| <code>EncounterTables.xml</code> | |||
| encountertable name | |||
|- | |||
| <code>body</code> | |||
| <code>Bodies.xml</code> | |||
| anatomy name | |||
|- | |||
| <code>conversation</code> or <code>convo</code> | |||
| <code>Conversations.xml</code> | |||
| conversation ID | |||
|- | |||
| <code>faction</code> | |||
| <code>Factions.xml</code> | |||
| faction name | |||
|- | |||
| <code>quest</code> | |||
| <code>Quests.xml</code> | |||
| quest name | |||
|- | |||
| <code>world</code> | |||
| <code>Worlds.xml</code> | |||
| cell name | |||
|- | |||
| <code>zonetemplate</code> or <code>zone</code> | |||
| <code>ZoneTemplates.xml</code> | |||
| zonetemplate name | |||
|} | |||
== Usage == | |||
If you wanted to create a citation for <code>ObjectBlueprints.xml</code>: | |||
<pre><nowiki>{{XML Reference | |||
|object | |||
}}</nowiki></pre>{{XML Reference | |||
|object | |||
}} | |||
When this template is used, a name is automatically assigned to the citation created so it may be cited again. When no sub-unit is specified, the name is equivalent to the parameter used; thus, the above example can be cited again using <code><nowiki><ref name="object"/></nowiki></code> | |||
<ref name="object"/> | |||
If you want to reference an XML file's sub-unit, such as a specific encountertable within <code>EncounterTables.xml</code>: | |||
<pre><nowiki>{{XML Reference | |||
|encountertable | |||
|EncounterTableName | |||
}}</nowiki></pre>{{XML Reference | |||
|encountertable | |||
|EncounterTableName | |||
}} | |||
When a sub-unit is specified, the citation name will be equivalent to the name of the sub-unit. Thus, the above example can be cited again using <code><nowiki><ref name="EncounterTableName"/></nowiki></code> | |||
<ref name="EncounterTableName"/> | |||
== See Also == | |||
* [[Template:References]] | |||
* [[Template:File Reference]] | |||
* [[Template:Code Reference]] | |||
==References== | |||
<references/> | |||
[[Category:Reference Templates]] | |||
</noinclude> | </noinclude> |
Latest revision as of 20:59, 5 June 2022
This template can be used to reference specific XML files and their contents.
Parameter | Result | Sub-unit |
---|---|---|
object
|
ObjectBlueprints.xml
|
object name |
population or pop
|
PopulationTables.xml
|
population name |
encountertable or encounter
|
EncounterTables.xml
|
encountertable name |
body
|
Bodies.xml
|
anatomy name |
conversation or convo
|
Conversations.xml
|
conversation ID |
faction
|
Factions.xml
|
faction name |
quest
|
Quests.xml
|
quest name |
world
|
Worlds.xml
|
cell name |
zonetemplate or zone
|
ZoneTemplates.xml
|
zonetemplate name |
Usage
If you wanted to create a citation for ObjectBlueprints.xml
:
{{XML Reference |object }}
When this template is used, a name is automatically assigned to the citation created so it may be cited again. When no sub-unit is specified, the name is equivalent to the parameter used; thus, the above example can be cited again using <ref name="object"/>
If you want to reference an XML file's sub-unit, such as a specific encountertable within EncounterTables.xml
:
{{XML Reference |encountertable |EncounterTableName }}
When a sub-unit is specified, the citation name will be equivalent to the name of the sub-unit. Thus, the above example can be cited again using <ref name="EncounterTableName"/>