WO2008092989A1 - Method and system for customizing an application using xml configuration files - Google Patents

Method and system for customizing an application using xml configuration files Download PDF

Info

Publication number
WO2008092989A1
WO2008092989A1 PCT/FI2008/000019 FI2008000019W WO2008092989A1 WO 2008092989 A1 WO2008092989 A1 WO 2008092989A1 FI 2008000019 W FI2008000019 W FI 2008000019W WO 2008092989 A1 WO2008092989 A1 WO 2008092989A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
tree
result
configuration file
configuration
Prior art date
Application number
PCT/FI2008/000019
Other languages
French (fr)
Inventor
Jarkko Enden
Pontus Lindman
Original Assignee
Medixine Oy
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Medixine Oy filed Critical Medixine Oy
Publication of WO2008092989A1 publication Critical patent/WO2008092989A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]

Definitions

  • the invention relates to a method and system for customizing an application using XML configuration files. Especially the invention relates to a method and system for merging XML configuration files.
  • XML is the standard format for web application configurations in these days. Basically all modern web applications include one or more XML configura- tion files. XML is also increasingly often used for defining business and application logic. In most applications, the changes made to these documents are not capsulated properly, which results in poor change management and ad-hoc customization.
  • An object of the invention is to overcome the problems of the prior art. Especially the object of the invention is to provide a method and system for customizing a software application automatically keeping original or cus- tomization configuration files intact. An additional object of the invention is to decreasing the amount of documentation needed for recording the changes, and allowing version upgrades without overriding the customizations made to the application.
  • the invention relates to a method for customizing an application as is claimed in claim 1.
  • the invention relates also to a system for customizing an application as is claimed in claim 6.
  • the invention relates to a computer program product for customizing an application as is claimed in claim 11.
  • Application may be any kind of software application, such as a web application using and/or including one or more XML standard files.
  • Attribute a part of an element that provides additional information about that element.
  • Child node a node contained by the element and directly below it in the tree hierarchy.
  • Custom configuration file or custom file is file by which an original file is merged.
  • the custom file may include for example personal and customized data.
  • Element A unit of XML data, delimited by tags.
  • An XML element can enclose other elements, such as, " ⁇ slide- show> ⁇ slide>.. ⁇ /slide> ⁇ slide>.. ⁇ /slide> ⁇ /slideshow>", the ⁇ slideshow> element contains two ⁇ slide> elements.
  • ID/Identifier identifies the element. The identifier must be unique between elements that are of the same type and have the same parent node.
  • Node can be an element node, an attribute node or a text node. Nodes are advantageously arranged in a tree hierarchy, and the nodes also advantageously have a type and an identifier (ID) identifying the node.
  • ID an identifier
  • - Original configuration file or original file contains original data, which should be kept intact. Data of the original file is merged or customized with custom file data and the result is stored in a result file.
  • Parent node of a node is the element that contains the node.
  • An element is the parent node of all of its child nodes.
  • a node has at most one parent node.
  • Result configuration file or tree or result file / tree contains original data customized with custom file data.
  • Result file or tree is a result of a merge of an original configura- tion file with a custom configuration file data, and is advantageously output in a volatile memory, or volatile storage, such as in random access memory (RAM- memory).
  • RAM- memory random access memory
  • a software application is customised with a custom configuration file, where the custom configuration file comprises at least one node.
  • the nodes are advantageously arranged in a tree hierarchy in the file, and the nodes also advantageously have a type and an identifier (ID) identifying the node.
  • the application comprises advan- tageously an original file comprising nodes in a tree and original data.
  • the original file is at first set as a result file / tree, and each node of said custom file is compared to corresponding nodes of the result configuration tree comprising the data and data structure of the original file.
  • the present invention is very reliable also in a comparison process, where an element node of said result file comprises two or more child elements of the same type.
  • said elements of the result file are checked whether at least on of said elements of the result file is a same type and comprises same ID as the corresponding element of the custom file to be merged with said result file. If the type and/or ID of at least one element of the result file do not correspond with said element of the custom file, said element of said custom file is appended to said result file.
  • said node of said custom file is merged with said result node, unless said node of said custom file comprises delete instruction, whereupon the corresponding node is removed from the result node.
  • all attributes are copied from the custom configura- tion file or node. If an attribute already exists in the result file or node, its value is overridden, and if an attribute does not exist in the result file or node, the attribute is created in the result file or node.
  • child nodes may be processed for example after the attributes. All children of the custom node can be looped. The looping is advantageously performed sequentially for each applicable node. If the child node includes a text node (containing only text), the original text of said result node is replaced with the text of the custom configuration node.
  • the custom child node and all of its descendants are advantageously appended to the result node, except if the child includes a delete instruction ( ⁇ ?delete?> XML processing instruction). If the child already exists in the result, the original and custom child nodes can be merged recursively using the same merge algorithm, except if the child includes a de- lete instruction. When a delete instruction is found inside the custom child, the original child is removed from the result.
  • the merge engine is advantageously based on a generic XML/DOM tree merging algorithm.
  • the merge engine is applicable for a wide variety of different XML merging needs, but it is extremely effective for merging several XML configuration files into a single XML file or DOM tree.
  • the merging of several files is performed advantageously sequentially.
  • the algorithm can also be used with XML modelling engines in applications based on adaptive object modelling (also called declarative programming).
  • the XML files of these applications are exceedingly complex since, in addition to traditional configurations, they also define most of the business and application logic.
  • An even more important benefit is the ability to perform version upgrades without overriding the customizations made to the application. If the inter- faces and basic structures of the original documents stay the same through different versions, the customized files do not need to be modified when performing an upgrade. If the changes were made in the original files, all changes would be lost when installing version upgrades or fix packs.
  • the merge engine provides a way to isolate the changes without replacing the original files completely.
  • XML parser and 2) if an element has several child elements of the same type, these elements need to be identified with an identifier. For example, if element of type A has two child elements of type B, the elements of type B must have an identifier that makes it possible to reference them in custom documents. The identifier must be unique between the elements of type B that are children of the same element. According to an embodiment of the invention merge can be performed for any XML files or DOM tree nodes. The only restriction is that the documents or nodes being merged must have the same root element. Merging is typically started by merging the root elements.
  • the merge engine also supports including XML files.
  • Figure 1 illustrates a block diagram of an exemplary method for customizing a software application according to an advantageous embodiment of the invention
  • Figures 2a-c illustrate exemplary of an original configuration file, custom configuration file and result configuration tree got according to an advantageous embodiment of the invention
  • Figures 3a-c illustrate exemplary of an original configuration file, an XML file to be included and result file got according to an advantageous embodi- ment of the invention
  • Figure 4 illustrates an exemplary system for customizing a software application according to an advantageous embodiment of the invention
  • Figure 5 illustrates an exemplary computer program product for customizing an application according to an advantageous embodiment of the invention.
  • Figure 1 illustrates a block diagram of an exemplary method 100 for customizing 102 a software application according to an advantageous embodiment of the invention.
  • the application includes or is related to by an original con- figuration file 106 comprising nodes advantageously in a tree hierarchy.
  • the application is customized or merged by at least one custom configuration file 104 comprising also at least one node.
  • step 108 types (or names of the elements) and possibly also identifiers are checked of the original and custom configuration files that they are compatible with each other. If not, the merging is stopped with error in step 110, and if yes the merging is continued in step 112, where the original configuration file is set as a result configuration tree. In other words a copy of the original configuration file is taken and named as a result configuration tree so that the original configuration file can be kept intact.
  • the result con- figuration tree is managed advantageously in a volatile memory and no special file is stored in a disk, for example. However, a file can also be stored according to an embodiment, but it is not compulsory.
  • step 114 all attributes may be copied from the custom configuration file to the result configuration tree, after which the first attribute of the cus- torn configuration file may be determined.
  • step 116 it is defined whether attributes already exist in the corresponding node of the result configuration tree just created. If the attribute is new (do not exist) then it is created in the result configuration tree in step 118. If the attribute is not new (do exist) then it is replaced in the result configuration tree in step 120.
  • step 122 it is determined in step 122 whether it was the last attribute. If it was not the last attribute, the next attribute of the custom configuration file is taken under construction in step 124 and steps 116-120 are repeated. If the attribute was the last one, then the first child of the custom configuration file is taken under construction in step 128, where it is at first determined in step 130, whether it is text node. If yes, all text in the corresponding node of the result configuration tree is overridden in step 132, after which it is determined in step 134 whether it was last child. However, if it is not text node, it is checked in step 136 whether it has identifier. If not, then it is checked in step 138 whether a single node with same type exist in result configuration tree. If no, then it is checked in step 140 whether it includes delete instruc- tions. If yes, then the process is continued in step 134. If it does not include delete function, the text node is then appended to the result configuration tree in step 142.
  • step 144 the next step is step 144.
  • step 146 it is checked in step 146 whether a node with a same type exists also in the result configuration tree. If not, then the node is appended in the result configuration tree in step 142 and the method is continued in step 134. However, if a node with a same type exists also in the result configuration tree, then it is checked in step 144, whether the node of the custom configuration file includes delete instructions.
  • step 144 if the node of the custom configuration file includes delete instructions, the corresponding node is removed from the result configuration tree in step 148 and the process is continued in step 134. However, if the node of the custom configuration file does not include delete instructions, then it is merged with the corresponding child in the original configuration file in step 150 and the process in continued in step 134.
  • step 134 it is checked whether is was last child. If not, then next child is taken under construction in step 152 and the method of steps 130-150 is repeated also with the new child. However, if the child in step 132 was last one, then the result configuration tree is returned in step 154.
  • Figures 2a illustrates an exemplary of an original configuration file 202
  • fig- ure 2b illustrates an exemplary of custom configuration file 204
  • 2c illustrates an exemplary of result configuration tree 206 got according to an advantageous embodiment of the invention, when each nodes 222, 224,
  • 225, 226 of the custom configuration file is merged with the corresponding and nodes 220, 221 , 222, 223, 224, 225 of the original configuration file ac- cording to the method steps illustrated in figure 1.
  • FIGS 2a-c illustrate exemplary of an original configuration file 302, an XML configuration file 304 to be included into the original configuration file and a result configuration tree got according to an advantageous embodiment of the invention, when the custom configuration file is merged with the original configuration file according to the method steps illustrated in figure 1.
  • Figure 4 illustrates an exemplary system 400 for customizing an application according to an advantageous embodiment of the invention
  • the systems comprises means 402 for setting said original configuration file as a result configuration tree, and means 404 for comparing at least one node of said custom configuration file to a corresponding node of the result configuration tree.
  • the system further comprises means 406 to check said nodes of the result configuration tree whether at least one of said nodes of the result configuration tree is a same type and comprises same ID as the node of the custom configuration file to be merged with said result configuration tree.
  • the system is adapted to append said node of said custom configuration file to said result configuration tree by means 408, and if yes, the system is adapted to merge said node of said custom configuration file with said result node by means 410, unless said node of said custom con- figuration file comprises delete instruction, whereupon the system is adapted to remove the corresponding node from the result node by means 412.
  • the system moreover may comprise also means 414 to copy attributes to an appropriate node of the result configuration tree so that if the corre- sponding node in the result configuration tree already contains said attribute, it is replaced, and if an attribute does not exist in the corresponding node in the result configuration tree, the attribute is created in said corresponding node in the result configuration tree.
  • the system may also comprise means 416 to concatenate text nodes and replace the original text of the result node with the concatenated text, such as also means 418 supporting mixed-mode elements, and append text of at least one node of the custom configuration file to the corresponding node of the result configuration tree without replacing the original text nodes in the corresponding node of the result configuration tree 422.
  • All these means 402-418, as well as advantageously also configuration file storages (401 , 403, 422) are coupled to each other by a bus means 420, where data between appropriate means are delivered.
  • Memory means 405 is used for storing data at least temporarily, and the processing means (such as CPU) 407 is used for managing the data flow between the means and storages via the bus 402, for example.
  • Figure 5 illustrates an exemplary computer program product 500 for customizing an application according to an advantageous embodiment of the invention.
  • the computer program product comprises code means 502 for setting said original configuration file as a result configuration tree, and code means 504 for comparing at least one node of said custom configuration file to a corresponding node of the result configuration tree, when said computer program product is run on a computer.
  • the computer program product further com- prises code means 506 to check said nodes of the result configuration tree whether at least one of said nodes of the result configuration tree is a same type and comprises same ID as the node of the custom configuration file to be merged with said result configuration tree.
  • the computer program product is adapted to append said node of said custom configuration file to said result configuration tree by code means 508, and if yes, the system is adapted to merge said node of said custom configuration file with said result node by code means 510, unless said node of said custom configuration file comprises delete instruction, whereupon the system is adapted to remove the corresponding node from the result node by code means 512.
  • the computer program product moreover may comprise also code means 514 to copy attributes to an appropriate node of the result configuration tree so that if the corresponding node in the result configuration tree already contains said attribute, it is replaced, and if an attribute does not exist in the corresponding node in the result configuration tree, the attribute is created in said corresponding node in the result configuration tree.
  • the computer program product may also comprise code means 516 to concatenate text nodes and replace the original text of the result node with the concatenated text, such as also code means 518 supporting mixed-mode elements, and append text of at least one node of the custom configuration file to the corresponding node of the result configuration tree without replac- ing the original text nodes in the corresponding node of the result configuration tree.

Abstract

A method (100) for customizing a software application using XML configuration file by at least one custom configuration file (104), is provided. The original configuration file (106) related to the application is set as a result configuration tree (112), after which a possible attribute in a node of the custom configuration file is copied (118, 120) to the corresponding node in the result configuration tree (either replacing the existing attribute or creating new one). It is also checked (108) whether at least one node of the custom configuration file is same type and comprises same ID as the node of the result configuration tree, whereupon said node of said custom configuration file is merged (150) with said node of the result configuration tree, unless said node of said custom configuration file comprises delete instruction (144). Otherwise said node of said custom configuration file is appended (142) to said result configuration tree.

Description

METHOD AND SYSTEM FOR CUSTOMIZING AN APPLICATION USING XML CONFIGURATION FILES
TECHNICAL FIELD OF THE INVENTION
The invention relates to a method and system for customizing an application using XML configuration files. Especially the invention relates to a method and system for merging XML configuration files.
BACKGROUND OF THE INVENTION
Software applications, such as web applications, are often heavily customized after deployment. Changes must usually be made in the original configuration files, which make it hard to keep track of changes.
XML is the standard format for web application configurations in these days. Basically all modern web applications include one or more XML configura- tion files. XML is also increasingly often used for defining business and application logic. In most applications, the changes made to these documents are not capsulated properly, which results in poor change management and ad-hoc customization.
A few, mainly generic algorithms are known from the prior art for merging XML configuration files. These are typically based on the DTD (Document Type Definition) standard and merging is performed if the files to be merged are valid instances of the same but arbitrary DTD.
However, there are some problems in the prior art methods, for example when using generic algorithms, namely problems arise in the conflict situa- tions, where same element exists in both (or at least in two) file to be merged, and especially if the elements exists in slightly different place in the first file than at least in another file. In this kind of conflict situation in the prior art it is not known which of these at least two files should be used. Also other problems exist in prior art merging such as keeping track of changes. SUMMARY OF THE INVENTION
An object of the invention is to overcome the problems of the prior art. Especially the object of the invention is to provide a method and system for customizing a software application automatically keeping original or cus- tomization configuration files intact. An additional object of the invention is to decreasing the amount of documentation needed for recording the changes, and allowing version upgrades without overriding the customizations made to the application.
The objects of the invention can be achieved with the features described in the characterizing portion of the independent claims.
The invention relates to a method for customizing an application as is claimed in claim 1.
The invention relates also to a system for customizing an application as is claimed in claim 6.
Moreover the invention relates to a computer program product for customizing an application as is claimed in claim 11.
The following notions and abbreviations are used in this document:
- "Application": may be any kind of software application, such as a web application using and/or including one or more XML standard files.
- "Attribute": a part of an element that provides additional information about that element. A qualifier on an XML tag that provides additional information. For example, in the tag <slide title="My Slide">, title is an attribute, and My Slide is its value.
- "Child node": a node contained by the element and directly below it in the tree hierarchy.
- "Custom configuration file": or custom file is file by which an original file is merged. The custom file may include for example personal and customized data.
- "Element": A unit of XML data, delimited by tags. An XML element can enclose other elements, such as, "<slide- show><slide>..</slide><slide>..</slide></slideshow>", the <slideshow> element contains two <slide> elements.
- "ID/Identifier": identifies the element. The identifier must be unique between elements that are of the same type and have the same parent node.
- "Node": can be an element node, an attribute node or a text node. Nodes are advantageously arranged in a tree hierarchy, and the nodes also advantageously have a type and an identifier (ID) identifying the node. - Original configuration file" or original file contains original data, which should be kept intact. Data of the original file is merged or customized with custom file data and the result is stored in a result file.
- "Parent node": Parent node of a node is the element that contains the node. An element is the parent node of all of its child nodes. A node has at most one parent node.
- "Result configuration file or tree" or result file / tree contains original data customized with custom file data. Result file or tree is a result of a merge of an original configura- tion file with a custom configuration file data, and is advantageously output in a volatile memory, or volatile storage, such as in random access memory (RAM- memory).
- "XML" Extensible Markup Language.
According to an embodiment of the invention a software application is customised with a custom configuration file, where the custom configuration file comprises at least one node. The nodes are advantageously arranged in a tree hierarchy in the file, and the nodes also advantageously have a type and an identifier (ID) identifying the node. The application comprises advan- tageously an original file comprising nodes in a tree and original data. According to an embodiment when the original data is customized the original file is at first set as a result file / tree, and each node of said custom file is compared to corresponding nodes of the result configuration tree comprising the data and data structure of the original file.
The present invention is very reliable also in a comparison process, where an element node of said result file comprises two or more child elements of the same type. According to an embodiment of the invention said elements of the result file are checked whether at least on of said elements of the result file is a same type and comprises same ID as the corresponding element of the custom file to be merged with said result file. If the type and/or ID of at least one element of the result file do not correspond with said element of the custom file, said element of said custom file is appended to said result file.
However, if the type and ID of any nodes of the result file correspond with said node of the custom file, said node of said custom file is merged with said result node, unless said node of said custom file comprises delete instruction, whereupon the corresponding node is removed from the result node.
According to a further embodiment of the invention, when the original node is set as the result node, all attributes are copied from the custom configura- tion file or node. If an attribute already exists in the result file or node, its value is overridden, and if an attribute does not exist in the result file or node, the attribute is created in the result file or node.
According to a further embodiment child nodes may be processed for example after the attributes. All children of the custom node can be looped. The looping is advantageously performed sequentially for each applicable node. If the child node includes a text node (containing only text), the original text of said result node is replaced with the text of the custom configuration node.
According to a further embodiment, if the child being processed does not exist in the result, the custom child node and all of its descendants are advantageously appended to the result node, except if the child includes a delete instruction (<?delete?> XML processing instruction). If the child already exists in the result, the original and custom child nodes can be merged recursively using the same merge algorithm, except if the child includes a de- lete instruction. When a delete instruction is found inside the custom child, the original child is removed from the result.
The merge engine is advantageously based on a generic XML/DOM tree merging algorithm. The merge engine is applicable for a wide variety of different XML merging needs, but it is extremely effective for merging several XML configuration files into a single XML file or DOM tree. The merging of several files is performed advantageously sequentially. The algorithm can also be used with XML modelling engines in applications based on adaptive object modelling (also called declarative programming). The XML files of these applications are exceedingly complex since, in addition to traditional configurations, they also define most of the business and application logic.
With the merge engine, it is possible to isolate all changes made to the original application in a fine-grained manner. XML elements and attributes can be added, modified and deleted without making any changes to the original documents. The data of the custom documents always override the data of the original documents. This introduces several benefits. All changes are capsulated in separate customization files, which include only the elements and attributes that need to be modified. This makes it easy to identify and manage the changes. In a way, the customizations become self- documenting, decreasing the amount of documentation needed for recording the changes. The capsulation and overriding of the original items can be compared to class inheritance in object-oriented languages.
An even more important benefit is the ability to perform version upgrades without overriding the customizations made to the application. If the inter- faces and basic structures of the original documents stay the same through different versions, the customized files do not need to be modified when performing an upgrade. If the changes were made in the original files, all changes would be lost when installing version upgrades or fix packs. The merge engine provides a way to isolate the changes without replacing the original files completely.
According to an embodiment of the invention an original XML files need to follow these two rules to allow them to be merged effectively:
1 ) all files must be proper XML files that can be read with any standard
XML parser, and 2) if an element has several child elements of the same type, these elements need to be identified with an identifier. For example, if element of type A has two child elements of type B, the elements of type B must have an identifier that makes it possible to reference them in custom documents. The identifier must be unique between the elements of type B that are children of the same element. According to an embodiment of the invention merge can be performed for any XML files or DOM tree nodes. The only restriction is that the documents or nodes being merged must have the same root element. Merging is typically started by merging the root elements.
Moreover it should be noted that according to an embodiment of the invention the merge engine also supports including XML files.
BRIEF DESCRIPTION OF THE DRAWINGS
Next the invention will be described in greater detail with reference to exem- plary embodiments in accordance with the accompanying drawings, in which
Figure 1 illustrates a block diagram of an exemplary method for customizing a software application according to an advantageous embodiment of the invention,
Figures 2a-c illustrate exemplary of an original configuration file, custom configuration file and result configuration tree got according to an advantageous embodiment of the invention,
Figures 3a-c illustrate exemplary of an original configuration file, an XML file to be included and result file got according to an advantageous embodi- ment of the invention,
Figure 4 illustrates an exemplary system for customizing a software application according to an advantageous embodiment of the invention, and
Figure 5 illustrates an exemplary computer program product for customizing an application according to an advantageous embodiment of the invention. DETAILED DESCRIPTION
Figure 1 illustrates a block diagram of an exemplary method 100 for customizing 102 a software application according to an advantageous embodiment of the invention. The application includes or is related to by an original con- figuration file 106 comprising nodes advantageously in a tree hierarchy. The application is customized or merged by at least one custom configuration file 104 comprising also at least one node.
At first at step 108 types (or names of the elements) and possibly also identifiers are checked of the original and custom configuration files that they are compatible with each other. If not, the merging is stopped with error in step 110, and if yes the merging is continued in step 112, where the original configuration file is set as a result configuration tree. In other words a copy of the original configuration file is taken and named as a result configuration tree so that the original configuration file can be kept intact. The result con- figuration tree is managed advantageously in a volatile memory and no special file is stored in a disk, for example. However, a file can also be stored according to an embodiment, but it is not compulsory.
Then in step 114 all attributes may be copied from the custom configuration file to the result configuration tree, after which the first attribute of the cus- torn configuration file may be determined. In step 116 it is defined whether attributes already exist in the corresponding node of the result configuration tree just created. If the attribute is new (do not exist) then it is created in the result configuration tree in step 118. If the attribute is not new (do exist) then it is replaced in the result configuration tree in step 120.
Next it is determined in step 122 whether it was the last attribute. If it was not the last attribute, the next attribute of the custom configuration file is taken under construction in step 124 and steps 116-120 are repeated. If the attribute was the last one, then the first child of the custom configuration file is taken under construction in step 128, where it is at first determined in step 130, whether it is text node. If yes, all text in the corresponding node of the result configuration tree is overridden in step 132, after which it is determined in step 134 whether it was last child. However, if it is not text node, it is checked in step 136 whether it has identifier. If not, then it is checked in step 138 whether a single node with same type exist in result configuration tree. If no, then it is checked in step 140 whether it includes delete instruc- tions. If yes, then the process is continued in step 134. If it does not include delete function, the text node is then appended to the result configuration tree in step 142.
However, if the node is not a text node, and it has not identifier, but a single node with same type exists in the result configuration tree (step 138), then the next step is step 144.
However, if the node is not a text node (in step 130), but it has identifier (in step 136), then it is checked in step 146 whether a node with a same type exists also in the result configuration tree. If not, then the node is appended in the result configuration tree in step 142 and the method is continued in step 134. However, if a node with a same type exists also in the result configuration tree, then it is checked in step 144, whether the node of the custom configuration file includes delete instructions.
After step 144, if the node of the custom configuration file includes delete instructions, the corresponding node is removed from the result configuration tree in step 148 and the process is continued in step 134. However, if the node of the custom configuration file does not include delete instructions, then it is merged with the corresponding child in the original configuration file in step 150 and the process in continued in step 134.
In step 134 it is checked whether is was last child. If not, then next child is taken under construction in step 152 and the method of steps 130-150 is repeated also with the new child. However, if the child in step 132 was last one, then the result configuration tree is returned in step 154.
Figures 2a illustrates an exemplary of an original configuration file 202, fig- ure 2b illustrates an exemplary of custom configuration file 204 and figure
2c illustrates an exemplary of result configuration tree 206 got according to an advantageous embodiment of the invention, when each nodes 222, 224,
225, 226 of the custom configuration file is merged with the corresponding and nodes 220, 221 , 222, 223, 224, 225 of the original configuration file ac- cording to the method steps illustrated in figure 1.
In figures 2a-c it can be seen that size of description has been changed from 128 to 64, while an element of "AccessRule" has been added and an element of "Validate" removed completely (see nodes 220-224 and 226 in the result configuration tree 206). Figures 3a-c illustrate exemplary of an original configuration file 302, an XML configuration file 304 to be included into the original configuration file and a result configuration tree got according to an advantageous embodiment of the invention, when the custom configuration file is merged with the original configuration file according to the method steps illustrated in figure 1.
Figure 4 illustrates an exemplary system 400 for customizing an application according to an advantageous embodiment of the invention,
The systems comprises means 402 for setting said original configuration file as a result configuration tree, and means 404 for comparing at least one node of said custom configuration file to a corresponding node of the result configuration tree. The system further comprises means 406 to check said nodes of the result configuration tree whether at least one of said nodes of the result configuration tree is a same type and comprises same ID as the node of the custom configuration file to be merged with said result configuration tree. If not, the system is adapted to append said node of said custom configuration file to said result configuration tree by means 408, and if yes, the system is adapted to merge said node of said custom configuration file with said result node by means 410, unless said node of said custom con- figuration file comprises delete instruction, whereupon the system is adapted to remove the corresponding node from the result node by means 412.
The system moreover may comprise also means 414 to copy attributes to an appropriate node of the result configuration tree so that if the corre- sponding node in the result configuration tree already contains said attribute, it is replaced, and if an attribute does not exist in the corresponding node in the result configuration tree, the attribute is created in said corresponding node in the result configuration tree.
The system may also comprise means 416 to concatenate text nodes and replace the original text of the result node with the concatenated text, such as also means 418 supporting mixed-mode elements, and append text of at least one node of the custom configuration file to the corresponding node of the result configuration tree without replacing the original text nodes in the corresponding node of the result configuration tree 422. All these means 402-418, as well as advantageously also configuration file storages (401 , 403, 422) are coupled to each other by a bus means 420, where data between appropriate means are delivered. Memory means 405 is used for storing data at least temporarily, and the processing means (such as CPU) 407 is used for managing the data flow between the means and storages via the bus 402, for example.
Figure 5 illustrates an exemplary computer program product 500 for customizing an application according to an advantageous embodiment of the invention.
The computer program product comprises code means 502 for setting said original configuration file as a result configuration tree, and code means 504 for comparing at least one node of said custom configuration file to a corresponding node of the result configuration tree, when said computer program product is run on a computer. The computer program product further com- prises code means 506 to check said nodes of the result configuration tree whether at least one of said nodes of the result configuration tree is a same type and comprises same ID as the node of the custom configuration file to be merged with said result configuration tree. If not, the computer program product is adapted to append said node of said custom configuration file to said result configuration tree by code means 508, and if yes, the system is adapted to merge said node of said custom configuration file with said result node by code means 510, unless said node of said custom configuration file comprises delete instruction, whereupon the system is adapted to remove the corresponding node from the result node by code means 512.
The computer program product moreover may comprise also code means 514 to copy attributes to an appropriate node of the result configuration tree so that if the corresponding node in the result configuration tree already contains said attribute, it is replaced, and if an attribute does not exist in the corresponding node in the result configuration tree, the attribute is created in said corresponding node in the result configuration tree.
The computer program product may also comprise code means 516 to concatenate text nodes and replace the original text of the result node with the concatenated text, such as also code means 518 supporting mixed-mode elements, and append text of at least one node of the custom configuration file to the corresponding node of the result configuration tree without replac- ing the original text nodes in the corresponding node of the result configuration tree.
The invention has been explained above with reference to the aforementioned embodiments, and several advantages of the invention have been demonstrated. It is clear that the invention is not only restricted to these embodiments, but comprises all possible embodiments within the spirit and scope of the inventive thought and the following patent claims.

Claims

Claims
1. A method (100) for customizing a software application using XML con-figuration file by at least one custom configuration file (104) comprising at least one node, and where an original configuration file (106) comprising nodes in a tree hierarchy is related to said application, characterized in that in the method a) said original configuration file is set as a result configuration tree (112), b) an attribute in a node of the custom configuration file is copied to the corresponding node in the result configuration tree so that if the corresponding node in the result configuration tree already contains said attribute, it is replaced (120), and if an attribute does not exist in the corresponding node in the result configuration tree, the attribute is created (118) in said corresponding node in the result configuration tree, whereupon c) it is checked whether at least one node of the custom configuration file is same type (108) and comprises same ID (136) as the node of the result configuration tree, and c1 ) if yes, said node of said custom configuration file is merged
(150) with said node of the result configuration tree, unless said node of said custom configuration file comprises delete instruction (144), whereupon the corresponding node is removed (148) from the result configuration tree, and c2) if not, said node of said custom configuration file is appended (142) to said result configuration tree.
2. A method according to claim 1 , wherein the tree comprises also at least one sub-tree.
3. A method according to claim 1 , wherein the method comprises also step b1), where, if the custom configuration file includes text nodes (130), the text nodes are concatenated and the original text in the corresponding node of said result configuration tree is replaced with the concatenated text.
4. A method according to any of the preceding claims, wherein the method is based on a generic XML/DOM tree merging algorithm.
5. A method according to any of the preceding claims, wherein several custom configuration files are merged with the original configuration file into a single result configuration tree sequentially.
6. A system (400) for customizing a software application using XML con- figuration file by at least one custom configuration file (104) comprising at least one node, and where an original configuration file (106) comprising nodes in a tree hierarchy is related to said application, characterized in that the system a) is adapted to set said original configuration file as a result configura- tion tree (402), b) is adapted to copy (414) an attribute in a node of the custom configuration file to the corresponding node in the result configuration tree so that if the corresponding node in the result configuration tree already contains said attribute, it is replaced, and if an attribute does not exist in the corresponding node in the result configuration tree, the attribute is created in said corresponding node in the result configuration tree, whereupon, the system is further c) adapted to check (406) whether at least one node of the custom configuration file is same type and comprises same ID as the node of the result configuration tree, and c1) if yes, the system is adapted (410) to merge said node of said custom configuration file with said node of the result configuration tree, unless said node of said custom configuration file comprises delete instruction, whereupon the system is adapted to remove the corresponding node from the result configuration tree, and c2) if not, the system is adapted (408) to append said node of said custom configuration file to said result configuration tree.
7. A system according to claim 6, wherein the tree comprises also at least one sub-tree.
8. A system according to claim 6, wherein, if the custom configuration file includes text nodes, the system is further adapted (416) in b1 ) to concatenate the text nodes and replace the original text in the corresponding node of said result configuration tree with the concatenated text.
9. A system according to any of the preceding claims 6-8, wherein the system is adapted to use an algorithm based on a generic XML/DOM tree merging algorithm.
10. A system according to any of the preceding claims 6-9, wherein the system is adapted to merge several custom configuration files with the original configuration file into a single result configuration tree sequentially.
11. A computer program product (500) for customizing a software application using XML configuration file by at least one custom configuration file (104) comprising at least one node, and where an original configuration file (106) comprising nodes in a tree hierarchy is related to said application, characterized in that the computer program product comprises program code means (502-518) adapted to perform at least the steps of claim 1 , when said computer program product is run on a computer.
PCT/FI2008/000019 2007-02-02 2008-01-31 Method and system for customizing an application using xml configuration files WO2008092989A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
FI20070092A FI123305B (en) 2007-02-02 2007-02-02 Procedures and systems for customizing an application using XML configuration files
FI20070092 2007-02-02

Publications (1)

Publication Number Publication Date
WO2008092989A1 true WO2008092989A1 (en) 2008-08-07

Family

ID=37832137

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/FI2008/000019 WO2008092989A1 (en) 2007-02-02 2008-01-31 Method and system for customizing an application using xml configuration files

Country Status (2)

Country Link
FI (1) FI123305B (en)
WO (1) WO2008092989A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016056236A1 (en) * 2014-10-08 2016-04-14 日本電気株式会社 Information processing device, information processing method, and recording medium
US10331460B2 (en) * 2016-09-29 2019-06-25 Vmware, Inc. Upgrading customized configuration files
CN117591117A (en) * 2024-01-19 2024-02-23 中建三局信息科技有限公司 Page generation method, system, equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448642B (en) * 2020-03-11 2022-11-15 成都鼎桥通信技术有限公司 System file access method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020103994A1 (en) * 2001-01-29 2002-08-01 Morrison Conor P. Methods and systems for constructing and interpreting hierarchical configuration files
EP1566740A2 (en) * 2004-02-13 2005-08-24 Satellite Information Services Limited Updating mark-up language documents
US20060053366A1 (en) * 2004-09-03 2006-03-09 Mari Abe Differencing and merging tree-structured documents
US20060130047A1 (en) * 2004-11-30 2006-06-15 Microsoft Corporation System and apparatus for software versioning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020103994A1 (en) * 2001-01-29 2002-08-01 Morrison Conor P. Methods and systems for constructing and interpreting hierarchical configuration files
EP1566740A2 (en) * 2004-02-13 2005-08-24 Satellite Information Services Limited Updating mark-up language documents
US20060053366A1 (en) * 2004-09-03 2006-03-09 Mari Abe Differencing and merging tree-structured documents
US20060130047A1 (en) * 2004-11-30 2006-06-15 Microsoft Corporation System and apparatus for software versioning

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"Merging XML Configuration Files", H-SPHERE DOCUMENTATION; CUSTOMIZATION GUIDE, 3 March 2005 (2005-03-03), Retrieved from the Internet <URL:http://www.psoft.net/HSdocumentation/customization/xml_merge_customization.html> *
"XML Manager", H-SPHERE DOCUMENTATION, DEVELOPER GUIDE, 4 March 2005 (2005-03-04), Retrieved from the Internet <URL:http://www.web.archive.org/web/20060717201430> *
LA FONTAINE R.: "Merging XML files: a new approach providing intelligent merge of XML data sets", XML EUROPE 2004, 20 May 2002 (2002-05-20) - 23 May 2002 (2002-05-23), XP002553464, Retrieved from the Internet <URL:http://www.deltaxml.com/dxml/93/version/default/part/AttachmentData/data/merging-xml-files.pdf> *
SAUDER D.: "XML configuration files: a step backwards?", DOUG'S INNER NET NEWS, 16 August 2003 (2003-08-16), Retrieved from the Internet <URL:http://www.dsauder.com/weblog/archives/000211.html> *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016056236A1 (en) * 2014-10-08 2016-04-14 日本電気株式会社 Information processing device, information processing method, and recording medium
US10261805B2 (en) 2014-10-08 2019-04-16 Nec Corporation Information processing apparatus for acquiring and classifying components in a configuration definition, information processing method, and recording medium
US10331460B2 (en) * 2016-09-29 2019-06-25 Vmware, Inc. Upgrading customized configuration files
CN117591117A (en) * 2024-01-19 2024-02-23 中建三局信息科技有限公司 Page generation method, system, equipment and storage medium
CN117591117B (en) * 2024-01-19 2024-04-23 中建三局信息科技有限公司 Page generation method, system, equipment and storage medium

Also Published As

Publication number Publication date
FI123305B (en) 2013-02-15
FI20070092A0 (en) 2007-02-02
FI20070092A (en) 2008-08-03

Similar Documents

Publication Publication Date Title
JP2863805B2 (en) Version management method
US7451433B2 (en) System and method for descriptor classes
US7644095B2 (en) Method and system for compound document assembly with domain-specific rules processing and generic schema mapping
JP5166519B2 (en) Consistent method system and computer program for developing software asset based solutions
US7475093B2 (en) Memory cache management in XML/relational data mapping
US7774300B2 (en) System and method for data model and content migration in content management applications
US20040064487A1 (en) Method and apparatus to migrate a database
US20080209316A1 (en) System and method of implementing an extensible command-line interface
US20110022575A1 (en) System and method of conclusively verifying the correctness of an information system without needing to test every combination of behaviour at run-time
EP2562641B1 (en) Software application porting system
US20070294661A1 (en) Data locations template based application-data association and its use for policy based management
US20080077850A1 (en) Content management via configuration set relationships in a content management system
US20060259854A1 (en) Structuring an electronic document for efficient identification and use of document parts
US20060242183A1 (en) Declaratively extended hierarchical configuration system and method
JP5072845B2 (en) Programmability for XML data store for documents
KR20130130706A (en) Managing data set objects in a dataflow graph that represents a computer program
CA2698265A1 (en) Managing data flows in graph-based computations
EP2005331A1 (en) Management of document attributes in a document managing system
US8417676B2 (en) Automated method for detecting and repairing configuration conflicts in a content management system
WO2008092989A1 (en) Method and system for customizing an application using xml configuration files
US8086588B2 (en) Computer program product and method for sharing information between multiple computer applications using a grafted model network
US20080276230A1 (en) Processing bundle file using virtual xml document
US8595718B1 (en) Method and system for generating a knowledge package
US7383512B1 (en) Method for synchronously binding an external behavior to a web page element
KR100545633B1 (en) storage medium for software package descripter file in SCA system and file parsing method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08718489

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08718489

Country of ref document: EP

Kind code of ref document: A1