[opencms-dev] Cannot Include Nested XSDs in OpenCMS 10.5.1

Clement Wee clement at elixirtech.com
Mon Apr 3 11:11:25 CEST 2017


Hi guys,

I am trying to use nested XSDs in my resource-type, but it keeps failing
with "invalid XML" error. The XSDs validate properly, so it is not the XSD.

The container is as follows:-

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:include
schemaLocation="opencms://system/modules/elixir.opencms/schemas/NestedDefault.xsd"/>
<xsd:include
schemaLocation="opencms://system/modules/elixir.opencms/schemas/Data.xsd"/>

<xsd:element name="NestedContainers" type="OpenCmsNestedContainers"/>

<xsd:complexType name="OpenCmsNestedContainers">
<xsd:sequence>
<xsd:element name="NestedContainer" type="OpenCmsNestedContainer"
minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="OpenCmsNestedContainer">
<xsd:sequence>
<xsd:element name="Properties" type="OpenCmsNestedDefault" />
<xsd:element name="Data" type="OpenCmsElxData" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
</xsd:complexType>

<xsd:annotation>
<xsd:appinfo>
<mappings>
<mapping element="Properties" mapto="property:Properties" />
<mapping element="Data" mapto="property:Data" />
</mappings>
<validationrules/>
<relations/>
<searchsettings containerPageOnly="true"/>
</xsd:appinfo>
</xsd:annotation>

</xsd:schema>

NestedDefault is:-

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>

<xsd:element name="NestedDefaults" type="OpenCmsNestedDefaults"/>

<xsd:complexType name="OpenCmsNestedDefaults">
<xsd:sequence>
<xsd:element name="NestedDefault" type="OpenCmsNestedDefault" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="OpenCmsNestedDefault">
<xsd:sequence>
<xsd:element name="Title" type="OpenCmsString" />
<xsd:element name="Text" type="OpenCmsHtml" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
</xsd:complexType>

<xsd:annotation>
<xsd:appinfo>
<mappings>
<mapping element="Title" mapto="property:Title" />
<mapping element="Title" mapto="urlName" />
</mappings>
<defaults>
<default element="Title" value="Add a new title here" />
<default element="Text" value="Add your text" />
</defaults>
<layouts>
<layout element="Text" widget="HtmlWidget" configuration="downloadgallery"
/>
</layouts>
<validationrules/>
<relations/>
<searchsettings containerPageOnly="true"/>
</xsd:appinfo>
</xsd:annotation>

</xsd:schema>

Data is:-

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">

<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>

<xsd:element name="ElxDatas" type="OpenCmsElxDatas"/>

<xsd:complexType name="OpenCmsElxData">
<xsd:sequence>
<xsd:element name="ElxDatas" type="OpenCmsElxData" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="OpenCmsElxData">
<xsd:sequence>
<xsd:element name="Value" type="OpenCmsString"/>
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
</xsd:complexType>

<xsd:annotation>
<xsd:appinfo>
<mappings>
<mapping element="Value" mapto="property:Value" />
</mappings>
<defaults>
<default element="Value"
value="Series,Category,Value\nSeries1,Cat1,10\nSeries1,Cat2,20\nSeries2,Cat1,40\nSeries2,Cat2,80"
/>-->
</defaults>
<layouts>
<layout element="Value" widget="TextareaWidget" configuration="20"/>
</layouts>
<validationrules/>
<relations/>
<searchsettings containerPageOnly="true"/>
</xsd:appinfo>
</xsd:annotation>

</xsd:schema>


What is the invalid XML in any of these?

Regards,
Clement

On Sat, Apr 1, 2017 at 6:00 PM, <opencms-dev-request at opencms.org> wrote:

> Send opencms-dev mailing list submissions to
>         opencms-dev at opencms.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
> or, via email, send a message with subject or body 'help' to
>         opencms-dev-request at opencms.org
>
> You can reach the person managing the list at
>         opencms-dev-owner at opencms.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of opencms-dev digest..."
>
>
> Today's Topics:
>
>    1.  TinyMCE filtering (Sandrine Prousteau)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 31 Mar 2017 12:06:43 +0000
> From: Sandrine Prousteau <s.prousteau at eurelis.com>
> To: The OpenCms mailing list <opencms-dev at opencms.org>
> Subject: [opencms-dev]  TinyMCE filtering
> Message-ID:
>         <HE1PR0601MB2602674612AA686714C8CA28F7370 at HE1PR0601MB2602.
> eurprd06.prod.outlook.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi all,
>
>
>
> We have a little issue on our xmlcontent editions : on HtmlWidget fields,
> running with TinyMCE editor, when our user is pasting from a *.docx a piece
> of text containing unordered list of percent values with some bold
> contents, some contents are cut. It's done with simple "paste", not "paste
> as text".
>
> Example :
>
> This value (numerics are in bold)
>
> +12.5%
>
> Is turned to
>
> +5%
>
>
>
> I have tried it on inline TinyMCE codepen http://codepen.io/tinymce/pen/
> YydQrY, and I found that with the options "paste_enable_default_filters:
> false" set in the .init(), the numerics are not cut (but all .docx styles
> are kept obviously).
>
>
>
> Is there someone who had this issue, and found a solution?
>
> Is there someone who knows how TinyMCE filters work?
>
>
>
> OpenCms 9.5.2.x / Windows 10 / Chrome
>
>
>
> Thanks for help.
>
>
>
> Sandrine
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opencms.org/pipermail/opencms-dev/
> attachments/20170331/f34d4478/attachment-0001.html>
>
> ------------------------------
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
> End of opencms-dev Digest, Vol 282, Issue 6
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170403/693fcfea/attachment.htm>


More information about the opencms-dev mailing list