Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


ADO RS Persisted to XML -- How To ?

From: Gadrin@-----.---
To: NULL
Date: 7/5/2005 11:01:00 AM
I've got an ADO recordset that is persisted to XML.

I wrote an XSL file to display the contents via .transformNode method
in MS XML.

Works great, except on XML files where one of the columns is null,
in that case the column is ommitted from the z:row element.

Now if I do the transform, all the data is shifted-left leaving the
last column blank on rows where the field is missing. Is there a
way to compensate for this ?

sample data...

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
	xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
	xmlns:rs='urn:schemas-microsoft-com:rowset'
	xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
	<s:ElementType name='row' content='eltOnly' rs:updatable='true'>
		<s:AttributeType name='OCN' rs:number='1' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='4'/>
		</s:AttributeType>
		<s:AttributeType name='NPA' rs:number='2' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='3'/>
		</s:AttributeType>
		<s:AttributeType name='NXX' rs:number='3' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='3'/>
		</s:AttributeType>
		<s:AttributeType name='BLK' rs:number='4' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='1'/>
		</s:AttributeType>
		<s:AttributeType name='LATA' rs:number='5' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='3'/>
		</s:AttributeType>
		<s:AttributeType name='RATECENTER' rs:number='6' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='11'/>
		</s:AttributeType>
		<s:AttributeType name='SWITCH' rs:number='7' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='11'/>
		</s:AttributeType>
		<s:AttributeType name='TANDEM' rs:number='8' rs:nullable='true'
rs:maydefer='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' dt:maxLength='11'/>
		</s:AttributeType>
		<s:extends type='rs:rowbase'/>
	</s:ElementType>
</s:Schema>
<rs:data>
	<z:row OCN='035B' NPA='336' NXX='356' BLK='A' LATA='424'
SWITCH='LVCRNCXADS0' TANDEM='ELKNNCXA03T'/>
	<z:row OCN='035B' NPA='336' NXX='439' BLK='A' LATA='424'
SWITCH='LVCRNCXADS0' TANDEM='ELKNNCXA03T'/>
	<z:row OCN='0468' NPA='910' NXX='253' BLK='A' LATA='428'
SWITCH='BOLVNCXARS1' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='287' BLK='A' LATA='428'
SWITCH='LGWDNCXARS1' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='575' BLK='A' LATA='428'
SWITCH='SESDNCXBRS1' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='579' BLK='A' LATA='428'
SWITCH='SESDNCXBRS1' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='754' BLK='A' LATA='428'
SWITCH='SHLTNCXADS1' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='755' BLK='A' LATA='428'
SWITCH='SHLTNCXADS1' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='842' BLK='A' LATA='428'
SWITCH='HLBHNCXBRS0' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='845' BLK='A' LATA='428'
SWITCH='BSLKNCXARS1' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0468' NPA='910' NXX='846' BLK='A' LATA='428'
SWITCH='HLBHNCXBRS0' TANDEM='SHLTNCXA02T'/>
	<z:row OCN='0469' NPA='828' NXX='626' BLK='A' LATA='420'
SWITCH='BDVLNCXADS0' TANDEM='AHVLNCOH04T'/>
	<z:row OCN='0470' NPA='252' NXX='065' BLK='A' LATA='951'
SWITCH='RCMTNCXA04T' TANDEM='RCMTNCXA04T'/>
	<z:row OCN='0470' NPA='252' NXX='206' BLK='A' LATA='951'
SWITCH='WLSNNCXA23F' TANDEM='RCMTNCXA04T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='0' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='1' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='2' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='3' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='4' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='5' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='6' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='7' LATA='951'
RATECENTER='KINSTON' SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='208' BLK='A' LATA='951'
SWITCH='KSTNNCXA52F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='209' BLK='A' LATA='951'
SWITCH='AHSKNCXA33A' TANDEM='RCMTNCXA04T'/>
	<z:row OCN='0470' NPA='252' NXX='212' BLK='A' LATA='951'
SWITCH='RCMTNCXA97F' TANDEM='RCMTNCXA04T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='0' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='1' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='2' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='3' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='4' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='5' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='6' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='8' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='9' LATA='951'
RATECENTER='GREENVILLE' SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='215' BLK='A' LATA='951'
SWITCH='GNVLNCXB35F' TANDEM='GNVLNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='221' BLK='0' LATA='951'
RATECENTER='WELCH' SWITCH='WLCHNCXARS0' TANDEM='ELCYNCXA02T'/>
	<z:row OCN='0470' NPA='252' NXX='221' BLK='2' LATA='951'
RATECENTER='WELCH' SWITCH='WLCHNCXARS0' TANDEM='ELCYNCXA02T'/>
</rs:data>
</xml>



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent