<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 05/gen/07, at 12:23, Daniele (mailing) wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">    secondo voi quando è più indicato l'uso di un attributo rispetto l'aggiunta di un nuovo elemento in XML? Mi spiego meglio, devo aggiungere un link nell'output dell'html, allora ho creato una struttura del genere nell'xml.<BR></BLOCKQUOTE><BR><BLOCKQUOTE type="cite">Ecco due soluzioni a riguardo:<BR> <BR> Proprietà data tramite Attributo<BR> <SMALL>&lt;link target="_blank"&gt;<BR>    ...<BR> &lt;/link&gt;</SMALL><BR> <BR> Proprietà data tramite Elemento<BR> <SMALL>&lt;link&gt;<BR>    ...<BR>   &lt;fragment&gt;&lt;/fragment&gt;<BR>   &lt;target&gt;_blank&lt;/target&gt;<BR> &lt;/link&gt;</SMALL><BR> <BR> secondo voi i PRO ed i CONTRO per queste due soluzioni? Quando conviene utilizzare più una rispetto all'altra e viceversa?<BR class="khtml-block-placeholder"></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>Questo è uno dei problemi lasciati aperti dall'XML. Tecnicamente sei obbligato ad usare un elemento quando possono essercene più di uno, oppure quando hai bisogno di usare dati molto lunghi, oppure che contengono sequenze particolari di caratteri (che dovrai inserire in CDATA).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>Per il resto, a meno che non  mi sfugga qualcosa, non esistono regole ... :)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>Cris<BR><BR></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="">-- </DIV><DIV style="">Cristiano Verondini</DIV><DIV style=""><A href="http://www.verondini.it">http://www.verondini.it</A>  ---  [ICQ 114 190]</DIV><DIV style=""><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>