Re: Advice On Testing With XML

Robert Kim Wireless Internet Advisor <[email protected]> Thu, 9 Jul 2009 16:49:08 -0700
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
Are you guys on twitter? whats your twitter address?
im @journik

On Thu, Jul 9, 2009 at 12:06 PM, Tennis Smith<[email protected]> wrote:
> Hi,
>
> I'm looking for some guidence in handling a testing issue.=A0 I'm new to
> XML/XSLT, so please bear with me.
>
> First, a little background.=A0 My charter is to generate XML test message=
s to
> make sure we process them correctly.=A0 These messages are validated agai=
nst a
> schema.=A0 I'm using generateDS to generate the test messages.=A0 This en=
sures
> the xml is correct.
>
> Everything works great except for one problem that keeps cropping up.=A0 =
Some
> elements cannot be defined easily ahead of time when generating the final
> test document.
>
> For example, a field of type "xs:date" will have to be modifed because te=
sts
> are based on a relative date, not an absolute one. That is, dates in tests
> are based on things like "3 days before today".
>
> Therefore, I'd like to figure out some way to change certain fields like
> date so that I can pass a string and _still validate_ it against the
> schema.=A0 Using the example, "-3" would be passed in the date field so t=
hat
> the test harness will recognize it as "today - 3 days".
>
> Put another way, the goal is to make this:
> =A0 <xs:element maxOccurs=3D"1" minOccurs=3D"0" name=3D"date" type=3D"xs:=
date"/>
> ...behave like this:
> =A0<xs:element maxOccurs=3D"1" minOccurs=3D"0" name=3D"date" type=3D"xs:s=
tring"/>
>
> Naturally, I can edit and copy/paste into a completely new schema file. B=
ut
> I was hoping someone could tell me if I can do some kind of XSLT or whate=
ver
> to get the same effect.
>
> Thanks,
>
>
> _______________________________________________
> XML-SIG maillist =A0- [email protected]
> http://mail.python.org/mailman/listinfo/xml-sig
>
>



-- =

Robert Q Kim, Wireless Internet Provider
http://journik.com
http://journik.posterous.com
http://twitter.com/journik
_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig