Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » XML
XML [message #1816891] Mon, 11 November 2019 09:15 Go to next message
Clever Alves is currently offline Clever AlvesFriend
Messages: 76
Registered: August 2019
Member
Hi there!

I've been reading about XML and have the following doubt: Can XML be also used to represent methods/operations (behaviours) somehow, rather than just data/structure?

Thank you for your attention.

Regards,

Clever.
Re: XML [message #1816897 is a reply to message #1816891] Mon, 11 November 2019 11:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31238
Registered: July 2009
Senior Member
Well, given that methods/operations can be (and typical are) expressed as a syntax trees (regardless of the language involved), and given that a syntax tree is "just a data structure", yes, XML Is able to express any arbitrary data structure including one that represents a syntax tree that could be interpreted as a method/operation by some compiler/generator/transformer/interpreter.
XML [message #1816961 is a reply to message #1816897] Wed, 13 November 2019 03:21 Go to previous messageGo to next message
Clever Alves is currently offline Clever AlvesFriend
Messages: 76
Registered: August 2019
Member
Thank you for your reply, Ed!

Would you know any example of such an implementation (a URL)?

Regards,

Clever.
Re: XML [message #1816975 is a reply to message #1816961] Wed, 13 November 2019 08:59 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31238
Registered: July 2009
Senior Member
No, but if you export an Ecore model with EOperations to an XML Schema (via the GenModel for that Ecore model) those operations are represented in the *.xsd that's produced, so that's sort of an example, but it doesn't include syntax for the operation body. If the EOperation does have a body annotation, that's just serialized as text content. E.g., https://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/plugins/org.eclipse.emf.ecore/model/Ecore.xsd#n238
Previous Topic:The {max occurs} of an element in an 'all' model group must be 0 or 1
Next Topic:XSD with a variable subtree definition
Goto Forum:
  


Current Time: Wed Jul 08 11:25:47 GMT 2020

Powered by FUDForum. Page generated in 0.02612 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top