IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

AltovaXml: Atomization of extension object is not supported. Options · View
warstar
Posted: Thursday, August 6, 2009 1:01:31 PM
Rank: Newbie

Joined: 8/6/2009
Posts: 4
Location: NL
Hi everyone,

I'm using the AltovaXML 2009 Sp1 Component to transform some xml files using XSLT 2.0.
The only problem is then i need to (for example) add a year to a date using the c# System.DateTime object and this is resulting in a Exception saying 'Atomization of extension object is not supported.'.

Is there any one who has had this problem before and knows how to fix it?

Thanks for any help!

Cheers,
Warnar

P.S. For a fully working/failing example of this problem please download the following file: http://download.lijnco.nl/AltovaHelp.zip

File Attachment(s):
AltovaHelp.zip (9kb) downloaded 284 time(s).


warstar
Posted: Thursday, August 6, 2009 1:24:54 PM
Rank: Newbie

Joined: 8/6/2009
Posts: 4
Location: NL
Well this is just a example.
I was trying to get it down to a bare minimum and since the online help always used System.DateTime I just used it.

Also the i tryed using a xsl:variable for it has the same effect.
I think the problem is that the engine just won't handle variables that are unknown to it so maybe that is my mistake.

P.S. strange i think by mistake i edited or remove your post vlad sorry.
vlad
Posted: Friday, August 7, 2009 11:09:58 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
I know the reason of this error message: only string, boolean, integer, float, double and decimal .NET variables can be converted to XML automatically. In all other cases you will have to do this manually.

For example, instead of your original code, which returns System.DateTime value:

<xsl:value-of select="date:AddYears($currentdate,1)" xmlns:date="clitype:System.DateTime" />

you will need to use:

<xsl:value-of select="date:ToString(date:AddYears($currentdate,1))" xmlns:date="clitype:System.DateTime" />
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.