insolit
03-31-2008, 09:05 AM
I have a main.lzx file that defines the layout for my application.
The my aim is to build separate lzx files that will be included in a specific place of that layout, using the include tag <include href="...lzx" />
The layout lzx loads well, but when i include the following lzx file:
<dataset name="dset" src="configuration.xml"/>
<simplelayout axis="y" />
<view datapath="dset:/Configuration/AvailableTypes">
<simplelayout axis="y" />
<text datapath="Type/text()"/>
</view>
I get the following compilation error: "configurator.lzx:3:2: The markup in the document following the root element must be well-formed."
"main.lzx" file has the following content:
<canvas width="100%" height="100%" bgcolor="0xc92222" debug="true">
<simplelayout axis="y" />
<!-- Header (displays a header and also contains a space "editableHeader" that might be used to show some information) -->
<view name="header" bgcolor="0x773c3c" width="100%" resource="images/logo.jpg">
<view name="logo" resource="images/logo.jpg" height="144" width="638" />
<view name="editableHeader" bgcolor="0xf3c614"
x="${parent.logo.width}" width="100%" height="${parent.logo.height}" />
</view>
<!-- Left area (container for a possible menu)
<view name="left" bgcolor="0x584f29" width="200" height="100%" y="${canvas.header.height}" /> -->
<!-- Application area -->
<view name="application" bgcolor="0x139b13" height="${canvas.height - canvas.header.height}" width="100%">
<simplelayout axis="y" />
<attribute name="cdHeight" value="100" type="number" />
<attribute name="bdHeight" value="100" type="number" />
<attribute name="confHeight" value="${this.height - (this.cdHeight + this.bdHeight)}" type="number" />
<view name="configurationDisplay" bgcolor="0x13409b" width="100%" height="${parent.cdHeight}" />
<view name="configurator" bgcolor="0x6a99f9" width="100%" height="${parent.confHeight}">
<include href="configurator.lzx" />
</view>
<view name="budgetDisplay" bgcolor="0xf3c614" width="100%" height="${parent.bdHeight}" />
</view>
</canvas>
The my aim is to build separate lzx files that will be included in a specific place of that layout, using the include tag <include href="...lzx" />
The layout lzx loads well, but when i include the following lzx file:
<dataset name="dset" src="configuration.xml"/>
<simplelayout axis="y" />
<view datapath="dset:/Configuration/AvailableTypes">
<simplelayout axis="y" />
<text datapath="Type/text()"/>
</view>
I get the following compilation error: "configurator.lzx:3:2: The markup in the document following the root element must be well-formed."
"main.lzx" file has the following content:
<canvas width="100%" height="100%" bgcolor="0xc92222" debug="true">
<simplelayout axis="y" />
<!-- Header (displays a header and also contains a space "editableHeader" that might be used to show some information) -->
<view name="header" bgcolor="0x773c3c" width="100%" resource="images/logo.jpg">
<view name="logo" resource="images/logo.jpg" height="144" width="638" />
<view name="editableHeader" bgcolor="0xf3c614"
x="${parent.logo.width}" width="100%" height="${parent.logo.height}" />
</view>
<!-- Left area (container for a possible menu)
<view name="left" bgcolor="0x584f29" width="200" height="100%" y="${canvas.header.height}" /> -->
<!-- Application area -->
<view name="application" bgcolor="0x139b13" height="${canvas.height - canvas.header.height}" width="100%">
<simplelayout axis="y" />
<attribute name="cdHeight" value="100" type="number" />
<attribute name="bdHeight" value="100" type="number" />
<attribute name="confHeight" value="${this.height - (this.cdHeight + this.bdHeight)}" type="number" />
<view name="configurationDisplay" bgcolor="0x13409b" width="100%" height="${parent.cdHeight}" />
<view name="configurator" bgcolor="0x6a99f9" width="100%" height="${parent.confHeight}">
<include href="configurator.lzx" />
</view>
<view name="budgetDisplay" bgcolor="0xf3c614" width="100%" height="${parent.bdHeight}" />
</view>
</canvas>