Using of Xinclude in a large Xml Document

<oXygen/> general issues.
leb
Posts: 14
Joined: Sat Nov 14, 2009 10:08 pm

Using of Xinclude in a large Xml Document

Post by leb » Tue Nov 24, 2009 4:20 pm

Hello Sorin,
I have a file "mother", and it contains several file "son" sections xinclude : That allows me to break my big xml file mother.
However, I would like to know if it is possible to trigger (controller) to load one or more sections of my document xinclude, through actions or évemnements: All that to avoid having to load the opening of all "son" files (contained in section XInclude) of my File mother , and thus to avoid overloading the PC's memory.

Regards,

Thanks.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Using of Xinclude in a large Xml Document

Post by sorin_ristache » Tue Nov 24, 2009 5:24 pm

Hello,

When the master file (the "mother" file) is opened in Text mode the included files (the "son" files) are not opened. If you want to open an included file in Text mode you have to open it explicitly using the File -> Open action or other action for opening a file (the Open URL action, drag and drop from Windows Explorer to the Oxygen window, double click on a file in Project view, etc).

When the master file is opened in Author mode there is an option for opening also the files that are included with XInclude but this option is applied to all included files: either all included files are opened or not opened. You cannot specify that only some included files will be opened. The option is called Display referred content and is available in Preferences -> Editor -> Pages -> Author.

What is the size of your files? Starting with version 11.0 there is a large file editor that can open files up to 200 MB for editing. Some features like Validate as you type and Spell checking as you type are not available in the large file editor but you can open and edit the large files in Oxygen. You set the minimum file size that triggers the large file support from the option Optimize loading in the Text page for files over (MB). The default value is 30 MB.


Regards,
Sorin

leb
Posts: 14
Joined: Sat Nov 14, 2009 10:08 pm

Re: Using of Xinclude in a large Xml Document

Post by leb » Thu Nov 26, 2009 1:43 pm

The problem is not the size of files that we are manipulated (only 3 mo). But the problem is that files son are stored son are on a remote server (in Alfresco) and are accessible only by webservice: So if opening the master document, it automatically opens all files son (about 30, we risk starting the execution of 30 webservices! (this is not manageable). I'd like to find a solution to load and open files only son that interest me. Have you any idea?

Thanks,
Regards.

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Re: Using of Xinclude in a large Xml Document

Post by george » Thu Nov 26, 2009 2:58 pm

As Sorin mentioned, just go to Options->Preferences -- Editor / Pages / Author and disable the "Display referred content" option.

To avoid accessing those file during validation disable also the XInclude processing from Options->Preferences -- XML / XML Parser.

It is not possible to XInclude only some files and not others.

Another possibility is to get a local copy of those files and use an XML catalog to map the remote locations to the local copies.

Best Regards,
George
George Cristian Bina

leb
Posts: 14
Joined: Sat Nov 14, 2009 10:08 pm

Re: Using of Xinclude in a large Xml Document

Post by leb » Wed Dec 02, 2009 1:34 pm

Hello,
I finally decided to get a local copy of those files and use an XML catalog to map the remote locations to the local copies.
However I have seen in the developer guide that the catalog used to reference a xml file to a xsd file(schema): can i also use the catalog to reference a xml file to another xml file?

Regards,
Thanks.

honyk
Posts: 168
Joined: Wed Apr 29, 2009 4:55 pm

Re: Using of Xinclude in a large Xml Document

Post by honyk » Wed Dec 02, 2009 2:53 pm

My response is quite off topic. Is it really necessary to have 'son' files stored in remote destination? If this is for keeping up to date file somewhere only, maybe some versioning system would be more suited for this. You can work with a local copy while up-to date versions are available in the repository, see the details at http://en.wikipedia.org/wiki/Revision_control

The second part is more related. I can imagine to have (if set in Preferences) all the xinclude content folded by default in Author mode and not loaded during opening the document. User could then unfold only necessary items and these would load at that moment.

Jan

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Re: Using of Xinclude in a large Xml Document

Post by george » Fri Dec 04, 2009 10:37 am

leb wrote:Hello,
[...] can i also use the catalog to reference a xml file to another xml file?
[...]
Yes, you should use system mappings for that.
George Cristian Bina

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Re: Using of Xinclude in a large Xml Document

Post by george » Fri Dec 04, 2009 10:43 am

honyk wrote:[...]
The second part is more related. I can imagine to have (if set in Preferences) all the xinclude content folded by default in Author mode and not loaded during opening the document. User could then unfold only necessary items and these would load at that moment.
Dear Jan,

That is sure an interesting idea. We have the option to not expand references. In this case we should offer an expand on request control directly in the author, something similar with opening a fold. I recorded this enhancement on our issue tracking system.

Best Regards,
George
George Cristian Bina

Post Reply