Radomize Date

Questions about XML that are not covered by the other forums should go here.
vlad
Posts: 3

Radomize Date

Tue Nov 18, 2014 7:51 pm

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: 2454

Re: Radomize Date

Wed Nov 19, 2014 1:37 pm

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

Re: Radomize Date

Wed Nov 19, 2014 3:01 pm

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: 2454

Re: Radomize Date

Wed Nov 19, 2014 4:11 pm

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

Re: Radomize Date

Wed Nov 19, 2014 4:15 pm

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

Thank you for your support!

Best Regards,
Vlad

Return to “General XML Questions”

Who is online

Users browsing this forum: No registered users and 0 guests