local-tx-datasource is defined in docs/schema/jboss-ds_5_0.xsd. There is also one at docs/dtd/jboss-ds_5_0.dtd, but I think the XSD is used. (This is for JBoss AS 5.1.0, other versions will be different.)
The rest of your question I do not understand. But to define a datasource you need to create a *-ds.xml file and place it in the delpoy directory. You can see many examples for different databases at docs/examples/jca. If you define multiple datasources, each must have its own JNDI name.
What i have is web services deployed that reference a datasource do calculations and return data. I have multiple clients that access the web service and each needs access to a different database. So i have 30 jndi datasources each representing one of the databases that when the client calls the web service i take the ip of the caller and find which datasource to use. How can i dynamically make sure that each is using the correct datasource ??
Give each datasource a different JNDI name. Create a hashmap that maps the requestor's IP address to the JNDI name. Then use the looked-up JNDI name to access the datasource.