Foren

Can we import an XML file into another XML file?

thumbnail
Srinu Bojjapally, geändert vor 6 Jahren.

Can we import an XML file into another XML file?

New Member Beiträge: 5 Beitrittsdatum: 10.03.15 Neueste Beiträge
In theme liferay-look-and-feel.xml I need to import one external xml file. I am trying it but getting error like "Error on line 11 of document : Element type "xi:include" must be declared. Nested exception: Element type "xi:include" must be declared."

what i did is

<?xml version="1.0"?>
<!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 7.0.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_7_0_0.dtd" [<!ENTITY sample SYSTEM "second-theme.xml">]>

<look-and-feel>
<compatibility>
<version>7.0.0+</version>
</compatibility>
<theme id="so-welcome" name="Social Office Welcome">
<template-extension>vm</template-extension>
<settings>
<setting configurable="false" key="show-site-name-default" value="false" />
<setting configurable="false" key="show-site-name-supported" value="true" />
</settings>
</theme>
&sample;

</look-and-feel>


Please suggest me. Thank you
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: Can we import an XML file into another XML file?

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hi Srinu,

No -- I'm pretty sure you can't do that. I'm not even sure why you are trying to. The whole point of this file is that it provides the "look and feel" settings for a single theme. The top level <theme/> element is used for semantic reasons, not so that you can put multiple nodes in.

For future reference, just check the DTD. It's there to provide you will all the rules around what you can and can't do.