RE: A new twist on attributes vs elements

Subject: RE: A new twist on attributes vs elements
From: "Hahn, Kimberly" <Kim.Hahn@xxxxxxxxxx>
Date: Tue, 14 Nov 2000 09:46:25 -0600
The system I work with uses SQL Server backend, COM+ middle tier components
and then ASP to call the COM+ components, no server side script.  All
database queries (stored procs) make sure the result sets have field names
that are viable attribute names.  We use ADO to convert the result set to
XML and this returns one node per record with the fields as attributes.  I
find that this keeps the XML smaller and that improves performance, less
stuff to send to the client means faster delivery.  The system predominately
uses XML as client side data.  Using the shape statement with ADO has also
allowed us to eliminate many of the transformations that were used to create
hierarchical XML out of multiple recordsets - the recordset is hierarchical
and the XML generated from it is as well.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Terris
Sent: Monday, November 13, 2000 11:54 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: A new twist on attributes vs elements

I agree with you about prefering attributes
but I ran into the case where
column names don't follow xml-names.  For
example depending on the vendor the names
can contain spaces.

Which means you can't use column names
as element names either.

Major bummer...

This is what I had to settle with...

<column name='foo'>data</column>

You could put the data in an attribute
as you like....

Furthermore if a column value is null how
would you represent that with attributes.


<column name='foo' xsd:isnull='true'/>

I'm not sure if the XSD spec supports null
attribute values.

----- Original Message -----
From: "Melvyn Rosengarden" <melrose@xxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Sunday, November 12, 2000 4:28 PM
Subject: A new twist on attributes vs elements

> I have seen a great deal of discussion recently about converting return
> from SQL ( cursors, recorsets, datawindows) into XML strings. All of the
> examples extract the column names of the return set and create XML with
> them. While this method is probably more efficient for storing and
> retrieving XML data in a relational database it is inferior when it comes
> navigating the DOM.  I would much prefer to work with attributes (when
> make sense) than a myriad of embeded elememts. Has anyone else recognized
> this as an issue and if so how did you resolve it...TIA
> "You already have zero privacy -- get over it !!
> Melvyn Rosengarden
> melrose@xxxxxxxxxxxxxxxx
>  XSL-List info and archive:

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread