I
ian mayo
Hi all,
I'm producing an simulation environment using scenarios defined in XML.
I want my users to be able to create a "variance" file in XML which will
allow them to specify how the original scenario should be modified before
re-running. Such modifications include:
- a new attribute value based either on a distribution or choice of values
or
- new elements to use based on a series of choices
I'm developing in Java, but am unsure of the optimal technologies to use.
The following is currently the favourite:
- Let the variance file identify the attribute/element to change using XPath
- Read the sceanrio into a DOM, then work through the variances - finding
the attribute/element to change using XPath then generating a new value
using variance attributes.
I'd appreciate anybody's opinions on this strategy. I've a gut feeling it
may be possible with XSLT, but I can't think how.
Cheers,
Ian
I'm producing an simulation environment using scenarios defined in XML.
I want my users to be able to create a "variance" file in XML which will
allow them to specify how the original scenario should be modified before
re-running. Such modifications include:
- a new attribute value based either on a distribution or choice of values
or
- new elements to use based on a series of choices
I'm developing in Java, but am unsure of the optimal technologies to use.
The following is currently the favourite:
- Let the variance file identify the attribute/element to change using XPath
- Read the sceanrio into a DOM, then work through the variances - finding
the attribute/element to change using XPath then generating a new value
using variance attributes.
I'd appreciate anybody's opinions on this strategy. I've a gut feeling it
may be possible with XSLT, but I can't think how.
Cheers,
Ian