seek help in xml diff

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

kelmenwong
Posts: 197
Joined: Sat, 17. Mar 12, 17:40
x3tc

seek help in xml diff

Post by kelmenwong »

say, in basic xsl template, there is these:
- template
- value-of
syntax
are these supported by the mod engine?

this is what i attempted, of-course, not working:

Code: Select all

<diff xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template name="AppendCraftingMark" match="t">
		<replace sel="text()[1]">
			<xsl:value-of select="."/> *
		</replace>
	</xsl:template>	

	<xsl:call-template name="AppendCraftingMark" sel="/language/page[@id='20101']/t[@id='10001']"/>
this is an attempt to replicate another modder work:
Inventory Crafts Items Marked

attempt to refine without the bother about language
CBJ
EGOSOFT
EGOSOFT
Posts: 54322
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ »

The modding system does not use XSL-T for XML patching, it just uses the very simple XML Patch specification. The specification has helpfully been summarised here by theqmann.
kelmenwong
Posts: 197
Joined: Sat, 17. Mar 12, 17:40
x3tc

Post by kelmenwong »

because i'm seeing other syntax not mentioning in the whatever doc i can found in the post, such as set_value

so, thinking just give a shot
anyways, thx for the feedback
CBJ
EGOSOFT
EGOSOFT
Posts: 54322
Joined: Tue, 29. Apr 03, 00:56
x4

Post by CBJ »

I think you're mixing up the XML patching syntax with the content being patched. The <set_value> node is an MD or AI script command and has nothing to do with XML Patch or XSL-T.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

This is probably what you are looking for (it's in the sticky above your thread :D )

http://forum.egosoft.com/viewtopic.php?t=354310
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

Return to “X Rebirth - Scripts and Modding”