<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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 class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"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><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>
                  <mappings><br>
                      <mapping element="MainContent/Title"
      mapto="property:Title" /><br>
                      <mapping element="MainContent/Title"
      mapto="urlName" /><br>
                  </mappings><br>
                  <defaults><br>
                      <default element="MainContent/Title" value="Add
      a new title here" /><br>
                      <default element="MainContent/Text" value="Add
      your text" /><br>
                  </defaults><br>
                  <searchsettings containerPageOnly="true"/><br>
              </xsd:appinfo><br>
          </xsd:annotation> <br>
      </xsd:schema><br>
      <br>
      <b>nested/address.xsd</b><b>:</b><br>
      <br>
      <xsd:schema xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"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"/><br>
          </xsd:complexType><br>
           <xsd:annotation><br>
              <xsd:appinfo><br>
                  <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>
      Kind regards<br>
      Antonio Cordeddu<br>
      <pre class="moz-signature" 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
<a class="moz-txt-link-abbreviated" href="mailto:antoniocordeddu@coranto.it">antoniocordeddu@coranto.it</a>
Skype: antonio.cordeddu
<a class="moz-txt-link-freetext" href="http://www.coranto.it">http://www.coranto.it</a>
___________________________________________</pre>
      <br>
      <br>
      <br>
      On 16/07/2015 13:57, Ashish Shekhar wrote:<br>
    </div>
    <blockquote
cite="mid:CAAYOqtXjaTeH+qoR-b0CRF2AdAc4fYk3Y7Qgg4qk7U0vrr3TRw@mail.gmail.com"
      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 moz-do-not-send="true"
              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 moz-do-not-send="true"
                      href="mailto:opencms-dev-bounces@opencms.org"
                      target="_blank">opencms-dev-bounces@opencms.org</a>
                    [mailto:<a moz-do-not-send="true"
                      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 class="h5">
                    <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
                                      moz-do-not-send="true"
                                      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
                                      moz-do-not-send="true"
                                      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 moz-do-not-send="true"
              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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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 class="moz-txt-link-freetext" href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a>



</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">____</pre>
  </body>
</html>