Ikael
August 25th, 2011, 18:45
Before updating Unicore ruleset to FGII v2.8 compatible I created lots of modules that didn't show up as individual entries in library windowlist. Instead there was one master module (say regular rulebook) that had normal library bookentry and all other modules were submodules/addendums for it. For example one submodule could add more skills which were displayed in master module's bookentry. This worked out with examples modules displayed below, without any coding. But now after FG v2.8 compatible update, it doesn't work anymore. I quess FGII v2.2 compatibility might have something to do with this.
So my question is, can I merge module databasenodes to enable similar effect that worked before? So far I haven't been able to succeed in it and started to wonder if it would be impossible.
I have tried to use DB.copyNode function and created my own recursive node copier but no luck. I did even try both out with modules where I removed the static="true" declaration. Now I started to thought if module databasenodes are static by default and instead of removing the attribute, I should set in to "false"?
Master module content
<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="2.8">
<library>
<Sample static="true">
<name type="string">Sample1</name>
<categoryname type="string">Category</categoryname>
<entries>
<test>
<librarylink type="windowreference">
<class>referenceindex</class>
<recordname>..</recordname>
</librarylink>
<name type="string">Numbers</name>
<index>
<one>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.one@Sample1</recordname>
</listlink>
<name type="string">One</name>
</one>
<three>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.three@Sample1</recordname>
</listlink>
<name type="string">Three</name>
</three>
</index>
</test>
</entries>
</Sample>
</library>
<reference>
<test>
<one>
<name type="string">One</name>
<description type="formattedtext">
<p>Number one</p>
</description>
</one>
<three>
<name type="string">Three</name>
<description type="formattedtext">
<p>Number three</p>
</description>
</three>
</test>
</reference>
</root>
Additional submodule content
<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="2.8">
<library>
<Sample static="true">
<name type="string"></name>
<categoryname type="string">Category</categoryname>
<entries>
<test>
<index>
<two>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.two@Sample2</recordname>
</listlink>
<name type="string">Two</name>
</two>
<four>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.four@Sample2</recordname>
</listlink>
<name type="string">Four</name>
</four>
</index>
</test>
</entries>
</Sample>
</library>
<reference>
<test>
<two>
<name type="string">Two</name>
<description type="formattedtext">
<p>Number two</p>
</description>
</two>
<four>
<name type="string">Four</name>
<description type="formattedtext">
<p>Number four</p>
</description>
</four>
</test>
</reference>
</root>
So my question is, can I merge module databasenodes to enable similar effect that worked before? So far I haven't been able to succeed in it and started to wonder if it would be impossible.
I have tried to use DB.copyNode function and created my own recursive node copier but no luck. I did even try both out with modules where I removed the static="true" declaration. Now I started to thought if module databasenodes are static by default and instead of removing the attribute, I should set in to "false"?
Master module content
<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="2.8">
<library>
<Sample static="true">
<name type="string">Sample1</name>
<categoryname type="string">Category</categoryname>
<entries>
<test>
<librarylink type="windowreference">
<class>referenceindex</class>
<recordname>..</recordname>
</librarylink>
<name type="string">Numbers</name>
<index>
<one>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.one@Sample1</recordname>
</listlink>
<name type="string">One</name>
</one>
<three>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.three@Sample1</recordname>
</listlink>
<name type="string">Three</name>
</three>
</index>
</test>
</entries>
</Sample>
</library>
<reference>
<test>
<one>
<name type="string">One</name>
<description type="formattedtext">
<p>Number one</p>
</description>
</one>
<three>
<name type="string">Three</name>
<description type="formattedtext">
<p>Number three</p>
</description>
</three>
</test>
</reference>
</root>
Additional submodule content
<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="2.8">
<library>
<Sample static="true">
<name type="string"></name>
<categoryname type="string">Category</categoryname>
<entries>
<test>
<index>
<two>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.two@Sample2</recordname>
</listlink>
<name type="string">Two</name>
</two>
<four>
<listlink type="windowreference">
<class>referencegeneral</class>
<recordname>reference.test.four@Sample2</recordname>
</listlink>
<name type="string">Four</name>
</four>
</index>
</test>
</entries>
</Sample>
</library>
<reference>
<test>
<two>
<name type="string">Two</name>
<description type="formattedtext">
<p>Number two</p>
</description>
</two>
<four>
<name type="string">Four</name>
<description type="formattedtext">
<p>Number four</p>
</description>
</four>
</test>
</reference>
</root>