cancel
Showing results for 
Search instead for 
Did you mean: 

XML fragmentation

premunir
Champ in-the-making
Champ in-the-making
I have an XML document that is composed of 4 different XML fragments(object,state,test,definition). Each of these fragments utilize child XML elements that may be shared among other documents. e.g. state_childobject_00003 is used in 10 docs.

I am looking to split these documents into respective fragments, and then associate them with the parent document through alfresco. So that in event I require to change, state_childobject_00003_rev1, to another revision that it is then reflected to all associated documents that utilize it. Thus reducing administrative requirements for in upwards of 10k+ documents.

Is this possible through alfresco content modeling? May I construct a "manifest" XML document that "includes" other alfreso fragments, that then include the objects such as state_childobject_00003_rev1? If so, how would retrieval of this document then acquire associated fragments and present them all to the end-user?

DOC1
- include OBJ1
- include STATE1
  – include STATE_1
- include TEST1
- include DEF1

DOC2
- include OBJ2
- include STATE2
  – include STATE_1
- include TEST2
- include DEF2

Thanks. Thomas
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
Your requirement is very specific I don't think there is anything Out of Box which you can use to achieve this. you need to have write custom utilities  to handle this.

Option I see is change extension of all your files to something different like ".cxml"
then create custom Parse which inherit the XMLParser.This parser will be invoked whenever you upload this kind of file
You can write a logic of manipulating your xml file inside that.
All the sub-component like STATE and OBJ I can see as small custom contents associated with XML.So that when you change actual component value it will be reflected everywhere.