xsl-list
[Top] [All Lists]

Using attributes and elements and text

2005-02-24 10:38:04
I have never see a conclusive definition on when using attributes
instead of elements (besides one that says by using attributes one is
sure that it is a leaf of the tree), and also using text values in
nodes uith childs. Let me put it this way; what are the functional
diferences between these constructs?

<XHoras>
        <Assuntos>
                <Assunto K="123">
                        As armas e os barões assinalados
                        <Detalhes>
                                <Tipo>0</Tipo>
                                <Detalhe/>
                        </Detalhes>
                </Assunto>
        </Assuntos>
</XHoras>

<XHoras>
        <Assuntos>
                <Assunto>
                        <K>123</K>
                        As armas e os barões assinalados
                        <Detalhes>
                                <Tipo>0</Tipo>
                                <Detalhe/>
                        </Detalhes>
                </Assunto>
        </Assuntos>
</XHoras>

<XHoras>
        <Assuntos>
                <Assunto>
                        <K>123</K>
                         <Desc>
                             As armas e os barões assinalados
                         </Desc>
                        <Detalhes>
                                <Tipo>0</Tipo>
                                <Detalhe/>
                        </Detalhes>
                </Assunto>
        </Assuntos>
</XHoras>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--