How to setup Dynamic Schema?

The problem I have come across is concerning the placement of the schema.
For dynamic items, I can’t have the code right under the tag

This doesn’t alllow it to work. Is there anyway of making this work?