Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » XSLT transform (or serialize) a subtree of an EMF model
XSLT transform (or serialize) a subtree of an EMF model [message #1835691] Thu, 10 December 2020 13:56 Go to next message
Nicholas Karwath is currently offline Nicholas KarwathFriend
Messages: 6
Registered: January 2020
Junior Member
Hi,

i need to run a XSLT transformation on a subtree of an EMF model. The plan: Serialize the subtree and run the transformation with the result file/stream as source.

Are there any better ways to achieve that? If not: What's the best practive to serialize not the complete model rather just a subtree? It's running on EMF Core 2.18.

regards,
Nicholas
Re: XSLT transform (or serialize) a subtree of an EMF model [message #1835694 is a reply to message #1835691] Thu, 10 December 2020 14:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
You could try the org.eclipse.emf.ecore.xmi.XMLResource.OPTION_ROOT_OBJECTS option. A different approach is to use EcoreUtil.copy and create a separate resource to serialize that.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XSLT transform (or serialize) a subtree of an EMF model [message #1835755 is a reply to message #1835694] Fri, 11 December 2020 14:55 Go to previous message
Nicholas Karwath is currently offline Nicholas KarwathFriend
Messages: 6
Registered: January 2020
Junior Member
I serialized a subtree with a copy, thanks Ed.
Previous Topic:Question about generation with xsd
Next Topic:Mint tool, where can I find it?
Goto Forum:
  


Current Time: Wed Apr 24 22:59:46 GMT 2024

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

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

Back to the top