How to define drawable parameters in layout xml

I am trying to move to using layout.xml files, but struggling a bit.

Firstly, where can I find documentation for what layout and drawable options are available, what parameters they expect etc?

I am trying to use a drawable for a battery icon multiple times (I need 3 of them).  For each I need to set a battery level (a width) and a location (x and y).  

So for my drawable I have this:

<drawable-list id = "battery" background = "Graphics.COLOR_TRANSPARENT">
	<shape type = "rectangle" x = "xloc" y = "100" width = "16" height = "7" border_width = "2" border_color = "Graphics.COLOR_WHITE" color = "Graphics.COLOR_TRANSPARENT"/>
</drawable-list>

Then in the layout.xml I want to do this:

<layout id="MainLayout">
    <label x="dc.getWidth() - 40" y="dc.getHeight() - 50" text="@Strings.clickHere" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_SMALL" />
    <label id="date" x="5" y="5" text="@Strings.date" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_LEFT" />
    <label id="time" x="5" y="35" text="@Strings.time" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_LEFT" />
    <label id="string" x="5" y="65" text="@Strings.string" color="Graphics.COLOR_WHITE" justification="Graphics.TEXT_JUSTIFY_LEFT" />
    <drawable id="battery">
   		<param name = "xloc">50</param>
    </drawable>
</layout>

However I get an error stating "Undefined symbol "xloc" detected.  Is there a way to achieve what I am trying to do?