Radomize Date

Questions about XML that are not covered by the other forums should go here.
vlad
Posts: 3
Joined: Tue Nov 18, 2014 7:23 pm

Radomize Date

Post by vlad »

Hello,

I`m trying to use Oxygen suite for generating XMLs based on XSD schemes, and I`ve run into a bit of an issue.
To be more precise, all the date fields in my XML are using the same default value:

Code: Select all

<xc:RefDate>00000101T00:00:00</xc:RefDate>
I know I can add different values in the "Element values" tab and then select the namespace / element to which those values will be applied.

BUT is there any way I can randomize this without adding any values? The XSD should already have specified what type of element it is:

Code: Select all

 <xsd:element minOccurs="0" name="RefDate" type="xcblDatetime"/>
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Radomize Date

Post by adrian »

Hi,

To obtain random values in the generated XML instance, you have to set in the Options tab of the Generate Sample XML Files tool "Values of elements and attributes" to "Random (apply restrictions)".

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
vlad
Posts: 3
Joined: Tue Nov 18, 2014 7:23 pm

Re: Radomize Date

Post by vlad »

Hello Adrian,

I`ve got one more question, if you may: is it possible to select just certain type of elements for randomization?
So, for example, I want to randomize just those elements which are of type - "Date" or "DateTime" or even "Decimal21_6".

Thank you,
Vlad
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Radomize Date

Post by adrian »

Hi,

No, you cannot randomize values selectively. You can either randomize all values, or none of them.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
vlad
Posts: 3
Joined: Tue Nov 18, 2014 7:23 pm

Re: Radomize Date

Post by vlad »

I see ..
Well, it was worth asking :P

Thank you for your support!

Best Regards,
Vlad
Post Reply