<div dir="ltr"><div><div><div>Thanks Antonio,<br><br></div>It worked with me as well.<br><br></div>Regards,<br></div>Ashish<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 20, 2015 at 1:53 PM, Antonio Cordeddu <span dir="ltr"><<a href="mailto:antoniocordeddu@coranto.it" target="_blank">antoniocordeddu@coranto.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Ashish,<br>
<br>
I tested and it works on OpenCms 9.5.2. So, please copy and paste,
it should be run also for you.<br>
<br>
<b>OceanSchm.xsd:</b><br>
<br>
<xsd:schema xmlns:xsd=<a href="http://www.w3.org/2001/XMLSchema" target="_blank">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"><br>
<xsd:include
schemaLocation="opencms://opencms-xmlcontent.xsd"/><br>
<xsd:include
schemaLocation="opencms://system/modules/my.template/schemas/nested/address.xsd"/><br>
<xsd:element name="OceanSchms"
type="OpenCmsOceanSchms"/><br>
<xsd:complexType name="OpenCmsOceanSchms"><br>
<xsd:sequence><br>
<xsd:element name="OceanSchm"
type="OpenCmsOceanSchm" minOccurs="0" maxOccurs="unbounded"/><br>
</xsd:sequence><br>
</xsd:complexType><span class=""><br>
<xsd:complexType name="OpenCmsOceanSchm"><br>
<xsd:sequence><br>
<xsd:element name="MainContent"
type="OpenCmsAddress" minOccurs="1" maxOccurs="10" /><br>
</xsd:sequence><br>
<xsd:attribute name="language" type="OpenCmsLocale"
use="required"/><br>
</xsd:complexType><br>
<xsd:annotation><br>
<xsd:appinfo><br></span>
<mappings><br>
<mapping element="MainContent/Title"
mapto="property:Title" /><br>
<mapping element="MainContent/Title"
mapto="urlName" /><br>
</mappings><span class=""><br>
<defaults><br>
<default element="MainContent/Title" value="Add
a new title here" /><br></span><span class="">
<default element="MainContent/Text" value="Add
your text" /><br>
</defaults><br></span>
<searchsettings containerPageOnly="true"/><span class=""><br>
</xsd:appinfo><br>
</xsd:annotation> <br>
</xsd:schema><br>
<br>
</span><b>nested/address.xsd</b><b>:</b><br>
<br>
<xsd:schema xmlns:xsd=<a href="http://www.w3.org/2001/XMLSchema" target="_blank">"http://www.w3.org/2001/XMLSchema"</a>
elementFormDefault="qualified"> <br>
<xsd:include
schemaLocation="opencms://opencms-xmlcontent.xsd"/> <br>
<xsd:element name="Addresss" type="OpenCmsAddresss"/>
<br>
<xsd:complexType name="OpenCmsAddresss"><br>
<xsd:sequence><br>
<xsd:element name="Address" type="OpenCmsAddress"
minOccurs="0" maxOccurs="unbounded"/><br>
</xsd:sequence><br>
</xsd:complexType><br>
<xsd:complexType name="OpenCmsAddress"><br>
<xsd:sequence><br>
<xsd:element name="Title" type="OpenCmsString"
/><br>
<xsd:element name="Text" type="OpenCmsHtml"
/> <br>
</xsd:sequence><br>
<xsd:attribute name="language" type="OpenCmsLocale"
use="optional"/><span class=""><br>
</xsd:complexType><br>
<xsd:annotation><br>
<xsd:appinfo><br></span><span class="">
<layouts><br>
<layout element="Text" widget="HtmlWidget"
configuration="height:400px,link,anchor,source,downloadgallery,formatselect"
/><br>
</layouts> <br>
</xsd:appinfo><br>
</xsd:annotation> <br>
</xsd:schema><br>
<br></span>
Kind regards<br>
Antonio Cordeddu<br>
<pre cols="72">_______________________________________________
Coranto informatica di Antonio Cordeddu
Via Torricelli, 9 09047 Selargius (CA) - Italy
Phone: +39 070 8607521
Fax: +39 070 8607521
Mobile: +39 328 7552662
<span class=""><a href="mailto:antoniocordeddu@coranto.it" target="_blank">antoniocordeddu@coranto.it</a>
Skype: antonio.cordeddu
<a href="http://www.coranto.it" target="_blank">http://www.coranto.it</a>
___________________________________________</span></pre><div><div class="h5">
<br>
<br>
<br>
On 16/07/2015 13:57, Ashish Shekhar wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Kai,<br>
<br>
</div>
I have removed the default definition from the nested xsd
and defined the defaults only in main xsd(abc.xsd) but
still its not coming.<br>
<br>
</div>
Any idea? <br>
<br>
</div>
Thanks<br>
</div>
Ashish<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jul 15, 2015 at 6:35 PM,
Schliemann, Kai <span dir="ltr"><<a href="mailto:K.Schliemann@comundus.com" target="_blank">K.Schliemann@comundus.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="DE">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Hi,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">did you remove the defaults definition
from your nested xsd (address.xsd) when you defined
the defaults in your main xsd (abc.xsd)?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">HTH</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Best regards</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Kai</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a href="mailto:opencms-dev-bounces@opencms.org" target="_blank">opencms-dev-bounces@opencms.org</a>
[mailto:<a href="mailto:opencms-dev-bounces@opencms.org" target="_blank">opencms-dev-bounces@opencms.org</a>]
<b>Im Auftrag von </b>Ashish Shekhar<br>
<b>Gesendet:</b> Mittwoch, 15. Juli 2015 14:49<br>
<b>An:</b> The OpenCms mailing list<br>
<b>Betreff:</b> [opencms-dev] Fwd: Issue with
default values in the content type</span></p>
<div>
<div>
<p class="MsoNormal"> </p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi.</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Does anyone have
idea how to set the default value for nested
content type? I tried all the approaches
suggested but doesn't make any difference.</p>
</div>
<p class="MsoNormal">-Ashish</p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> </p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">----------
Forwarded message ----------<br>
From: <b>Ashish Shekhar</b> <<a href="mailto:ashish.shekharcsc@gmail.com" target="_blank">ashish.shekharcsc@gmail.com</a>><br>
Date: Mon, Jul 13, 2015 at 2:57 PM<br>
Subject: Issue with default values
in the content type<br>
To: The OpenCms mailing list <<a href="mailto:opencms-dev@opencms.org" target="_blank">opencms-dev@opencms.org</a>><br>
<br>
</p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I
have created content
type for which I have
configure xsd as per my
need.</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">The
default value which is
coming fine for simple xml
content type but when I
used nested content type
the default value is not
coming.</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I
want the default value
should come to every nested
items when ever I add new
instance + but its not
coming to a single instance.</p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I
am attaching my xsd. Does
anyone have idea what is
missing here?</p>
</div>
<p class="MsoNormal">Thanks</p>
</div>
<p class="MsoNormal"><span><span style="color:#888888">Ashish</span></span></p>
</div>
</div>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the
list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
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
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
<br>
<br>
</div></div><pre cols="72">____</pre>
</div>
<br>_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" rel="noreferrer" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
<br></blockquote></div><br></div>