Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.java > #9000

Re: creazione file XML con java

X-Received by 10.157.40.151 with SMTP id s23mr4413084ota.97.1479020890315; Sat, 12 Nov 2016 23:08:10 -0800 (PST)
X-Received by 10.157.37.125 with SMTP id j58mr861229otd.18.1479020890285; Sat, 12 Nov 2016 23:08:10 -0800 (PST)
Path csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!q124no1190857itd.0!news-out.google.com!c26ni1165itd.0!nntp.google.com!q124no243495itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups it.comp.java
Date Sat, 12 Nov 2016 23:08:10 -0800 (PST)
In-Reply-To <o07tu1$avk$1@gioia.aioe.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=79.55.151.172; posting-account=alWjRAoAAABzAQDIs-0m2KU-hS1ktifO
NNTP-Posting-Host 79.55.151.172
References <o07tu1$avk$1@gioia.aioe.org>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <ccb93c7d-9221-48c0-b7e6-2d352139b109@googlegroups.com> (permalink)
Subject Re: creazione file XML con java
From Pa°L° <paolovanacore@gmail.com>
Injection-Date Sun, 13 Nov 2016 07:08:10 +0000
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Xref csiph.com it.comp.java:9000

Show key headers only | View raw


Il giorno sabato 12 novembre 2016 21:26:44 UTC+1, Paolo ha scritto:
> Quando c'è scritto nelle specifiche XSD  di un campo "minOccurs=0 "  , 
> significa che quel nodo lo posso omettere oppure lo lascio con valore vuoto?
> 
> Esempio (devo mettere 1 se il pagamento è anticipato, altrimenti se non lo 
> fosse? ) :
> 
> <xs:element name="flagPagamentoAnticipato" minOccurs="0">
>                                 <xs:simpleType>
>                                     <xs:restriction base="xs:int">
>                                         <xs:enumeration value="1"/>
>                                     </xs:restriction>
>                                 </xs:simpleType>
>                             </xs:element>
> 
> 
> Grazie


Il giorno sabato 12 novembre 2016 21:26:44 UTC+1, Paolo ha scritto:
> Quando c'è scritto nelle specifiche XSD  di un campo "minOccurs=0 "  , 
> significa che quel nodo lo posso omettere oppure lo lascio con valore vuoto?
> 
> Esempio (devo mettere 1 se il pagamento è anticipato, altrimenti se non lo 
> fosse? ) :
> 
> <xs:element name="flagPagamentoAnticipato" minOccurs="0">
>                                 <xs:simpleType>
>                                     <xs:restriction base="xs:int">
>                                         <xs:enumeration value="1"/>
>                                     </xs:restriction>
>                                 </xs:simpleType>
>                             </xs:element>
> 
> 
> Grazie

Quel "minOccurs=0", numero minimo di occorrenze a 0, significa che l'elemento può non essere presente nell'XML.
Qui trovi info sulle cardinalità: http://www.w3schools.com/xml/schema_complex_indicators.asp

Se l'elemento è presente, il solo valore che può avere è 1:
Qui trovi info su Restrictions/Facets: http://www.w3schools.com/xml/schema_facets.asp

> Esempio (devo mettere 1 se il pagamento è anticipato, altrimenti se non lo fosse? )
L'XSD ti dice che l'elemento "flagPagamentoAnticipato" può non esserci nell'XML ma, se presente, deve avere valore 1.

Back to it.comp.java | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

creazione file XML con java "Paolo" <begos@alice.it> - 2016-11-12 21:27 +0100
  Re: creazione file XML con java Pa°L° <paolovanacore@gmail.com> - 2016-11-12 23:04 -0800
    Re: creazione file XML con java "Paolo" <begos@alice.it> - 2016-11-13 13:46 +0100
  Re: creazione file XML con java Pa°L° <paolovanacore@gmail.com> - 2016-11-12 23:08 -0800
  Re: creazione file XML con java Pa°L° <paolovanacore@gmail.com> - 2016-11-12 23:14 -0800
  Re: creazione file XML con java Enrico Bianchi <enrico.bianchi@ymail.com> - 2016-11-13 14:57 +0000
    Re: creazione file XML con java "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2016-11-13 18:17 +0100

csiph-web