From: Ross Shaw Date: 2001-11-29T21:54:16+09:00 Subject: [ruby-talk:26885] Re: Anyone know of a Regexp pattern random string generator? "Pierre-Charles David" wrote in > > Ross> This is intended to be part of a larger system that given an > Ross> XML schema would produce a valid XML file - I am looking at > Ross> using this to produce random input test files (and their > Ross> expected output files) to test a transformation engine with > Ross> a sample of all possible inputs. > > I don't really understand why you need/want to use regexps for this... > XML Schema allows for a "pattern" facet against an element or attribute to validate only if it matches the pattern. This pattern facet is essentially a regular expression. > Anyway, there is something similar on IBM's alphaworks site. It's > called 'XML Generator' and seems to works with DTDs instead of > Schemas, but maybe it could still be useful or give you ideas: > I'm aware of this but as DTD's do not specify anything about what you put in an element its not really appropriate. Also I am wanting to generate not only the XML input file to the transformation but also the output file - which could be fixed or delimited. This is for the purpose of unit testing the transformation. Ross