Check line 101, I believe there is an error. Missing >
Also, what about dynamic inventory scaling? Right now you have static sizes for inventory and weight, but it seems reasonable to allow for either an evaluated string or simply to calculate it via other means. For instance, in your gold limit script you allow items to affect how much you can carry, it seems like a reasonable fit here as well. Of course this leads to my other suggestion which is a <no count> tag, or similar, that tags a item/stack as not counting towards your item/weight limit. This would be particularly useful for things, such as with the Gold Limit script or even the conditions mentioned above, where you have items that are being used to determine your total holdings.
Example requiring dynamic weights/sizes:
Each character is able to carry x pounds; adding another character to you party improves amount of weight you can carry. Purchase of items like sacks or backpacks increases the number of items you can carry. It's a primitive but effective way to simulate the old style of RPG's where each character had item/weight limitations as well as managing each individual inventory. I think the only issue here is there is no way to deal with a reduction in size that causes 'overflow' and I suspect that's the reason you didn't do it in the first place.
Final suggestion, when you are on the item screen, once you have selected the type of item you are browsing, you should hide the weight/size windows. It overlaps the information window and that has zero benefit to the player, especially if you have a lot of information.