RE: [flexcoders] Validating XML with XSD Schema in Flex?

2006-10-06 Thread Samuel R. Neff
Where is the XML coming from?  Can you use server-side code to validate the
XML before sending it to Flex?  That's probably the simpler solution.

Sam
 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of wayneposner
Sent: Friday, October 06, 2006 9:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Validating XML with XSD Schema in Flex?

I've been scouring the web tyring to find information on XML validation
using an XSD file, but the only results I keep finding relate to the MXML
schema which is not what I'm looking for.

Has anyone written any code that validates an XML file against it's schema?
Or is this of of the coding practices that Flex does not implement?

The point being, if I want to explicity define what my input XML looks like
to my flex application, right now, the only way this seems possible to to
write code that defines the business logic of each node/attribute and
whether or not there is a value restrition.  
Should my business logic change, then I have to go and change my code. 

If there is some way to simply read the XSD and validate directly against
that, the only place I have to go to change my business logic is to the
XSD--no code changes/recompilations necessary.

Thanks,
Wayne



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Validating XML

2005-05-25 Thread Erik Westra
All that is possible in Flex is based on the Flash Players capabilities.
Validation with XSD is not implemented in the player and thus not
possible in Flex.

The flash player only has most basic features available, as u know its
only possible to dynamicly load one type of image, sound and movie. This
is don't in order to keep the player itself small. I guess the same
reason has made that XSD didn't make it into the player.


Greetz Erik


-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: dinsdag 24 mei 2005 17:51
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Validating XML

My perception of Castor and the reason to use it is based on the ability
to validate your data/value objects in Java, thus ensuring that if your
data is valid, and another system has problems using it, it is the other
system and not the base Java code.

Furthermore, the use of XSD's for data objects allows the proliferation
of many standard value objects to be used across a myriad of
applications with the ability of those applciations to validate the data
they are sending, thus ensuring ease of communication across disparate
systems.

With the above 2 said, that is my guess as to why someone would expect
Flex to validate the XML via the XSD before sending; that way you can
ensure the data you are sending back to Java is valid ... in form, not
in contents. 
So, if the number is 0-0-0-0-0 instead of 000-000-, that is a data
input validation error, but at least the data is well formed.

Does that make sense?  I'm not saying I agree with using an XSD vs. just
straight RemoteObject and mapping both server-side and client side value
object classes to match as close as possible, and through testing you
are ensured that the data works since you mirrored the Java class client
side in a value object, but your thoughts do help me understand the
why someone would want to do it; I'm trying to build up a decent
inference here.



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Validating XML

2005-05-24 Thread JesterXL
My perception of Castor and the reason to use it is based on the ability to 
validate your data/value objects in Java, thus ensuring that if your data is 
valid, and another system has problems using it, it is the other system and 
not the base Java code.

Furthermore, the use of XSD's for data objects allows the proliferation of 
many standard value objects to be used across a myriad of applications with 
the ability of those applciations to validate the data they are sending, 
thus ensuring ease of communication across disparate systems.

With the above 2 said, that is my guess as to why someone would expect Flex 
to validate the XML via the XSD before sending; that way you can ensure the 
data you are sending back to Java is valid ... in form, not in contents. 
So, if the number is 0-0-0-0-0 instead of 000-000-, that is a data input 
validation error, but at least the data is well formed.

Does that make sense?  I'm not saying I agree with using an XSD vs. just 
straight RemoteObject and mapping both server-side and client side value 
object classes to match as close as possible, and through testing you are 
ensured that the data works since you mirrored the Java class client side in 
a value object, but your thoughts do help me understand the why someone 
would want to do it; I'm trying to build up a decent inference here.


- Original Message - 
From: Steven Webster [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, May 24, 2005 11:12 AM
Subject: RE: [flexcoders] Validating XML


Jester,

 Is there a way to validate XML through an XSD on the client
 before sending it through an HTTPService?

Quick answer is no, I don't think you can do schema validation
on the client ... however, I'd also argue that this kind of
validation belongs on the server anyway (and that client-side
validation exists to improve the user-experience, and to reduce
unncecessary roundtrip to the server, rather than to validate
correctness of the data in the strictest sense).

Thoughts ?

Steven

--
Steven Webster
Technical Director
iteration::two

This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.

Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.




Yahoo! Groups Links







 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/