logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Validation question: msg#00001

Subject: Validation question
I have a snippet of XML that looks like this:

<TimeWindow>
   <EarlyPickupDate>20030906075200</EarlyPickupDate>
</TimeWindow>

The schema for it looks like this:

TimeWindow =
  notAllowed
  | element TimeWindow {
      EarlyPickupDate?,
      LatePickupDate?,
      EarlyDeliveryDate?,
      LateDeliveryDate?
    }

nxml is telling me that there are required elements of TimeWindow that
are missing ("Required elements missing").  There shouldn't be any
required elements, at least not that I can tell.  Am I not
understanding something?  Also, what does the 'notAllowed' bit do?

Here is the original XSD for that chunk:

        <xsd:element name = "TimeWindow">
                <xsd:annotation>
                        <xsd:documentation>TimeWindow is a group of fields 
...</xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element ref = "EarlyPickupDate" minOccurs 
= "0"/>
                                <xsd:element ref = "LatePickupDate" minOccurs = 
"0"/>
                                <xsd:element ref = "EarlyDeliveryDate" 
minOccurs = "0"/>
                                <xsd:element ref = "LateDeliveryDate" minOccurs 
= "0"/>
                        </xsd:sequence>
                </xsd:complexType>
        </xsd:element>

Which I converted to Relax NG (using Sun's rngconv utility):

<define name="TimeWindow">
        <choice>
            <notAllowed/>
            <element name="TimeWindow">
                <optional>
                    <ref name="EarlyPickupDate"/>
                </optional>
                <optional>
                    <ref name="LatePickupDate"/>
                </optional>
                <optional>
                    <ref name="EarlyDeliveryDate"/>
                </optional>
                <optional>
                    <ref name="LateDeliveryDate"/>
                </optional>
            </element>
        </choice>
    </define>

Which was then itself converted into the compact syntax using trang.

nXML mode version is 20031031, if that matters.  Thanks!


--
Regards,

joe
Joe Casadonte
jcasadonte@xxxxxxxxxxxxxxxxxxxx

------------------------------------------------------------------------------
         Llama Fresh Farms => http://www.northbound-train.com
   Gay Media Resource List => http://www.northbound-train.com/gaymedia.html
            Perl for Win32 => http://www.northbound-train.com/perlwin32.html
               Emacs Stuff => http://www.northbound-train.com/emacs.html
          Music CD Trading => http://www.northbound-train.com/cdr.html
------------------------------------------------------------------------------
                       Live Free, that's the message!
------------------------------------------------------------------------------


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/2U_rlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
emacs-nxml-mode-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 





<Prev in Thread] Current Thread [Next in Thread>