Two interesting XSLTs:
- XSLT to parse CSV into XML,
- XSLT to transform XML to CSV
–jeroen
Posted by jpluimers on 2013/02/21
Two interesting XSLTs:
–jeroen
Posted in CSV, Development, Software Development, XML, XML/XSD, XSD, XSLT | Leave a Comment »
Posted by jpluimers on 2011/09/01
Because of Excel XML Spreadsheet: Date.Type is mandatory :), I researched a bit more about how people use the XML Spreadsheet format.
I found that Technobabble is using XSL to generate Excel XML Spreadsheets.
Be patient following the above link; it takes a while to completely load, and while loading the style sheet shows black text on a dark grey background :) When loaded completely, the background becomes white.
The article talks more about styles and formulas (XML Spreadsheets store formulas in relative R1C1 style notation which is far easier to parse than the absolute A1 style notation, which most people use).
It seems to imply that for a ss:Column, a ss:AutoFitWidth of 1 (True) combined with a specified ss:Width will autosize text values, but the ss:Column documentation is right: “We do not autofit textual values”.
The default Excel 2003 font has a Width of about 7 points per character, so you can use that as a base to calculate ss:Width values for a column.
–jeroen
Posted in Development, Software Development, XML, XML/XSD, XSD | Leave a Comment »
Posted by jpluimers on 2011/08/25
I found some time to continue my series that started with Excel XML Spreadsheet: Date.Type is mandatory :)
This time, it is about Styles and using the styles to format. I’ll limit myself to formatting Columns, but you can equally apply this to individual Cells, Rows, and Tables.
Note that in the below XML listings, I have replaced the angle brackets with { and }, because the WordPress editor will otherwise delete the XML from the sourcecode portions.
First, let’s look at some ss:Styles:
{Styles}
{Style ss:ID="Default" ss:Name="Normal"}
{Alignment ss:Vertical="Bottom"/}
{/Style}
{Style ss:ID="s21"}
{NumberFormat ss:Format="yyyy/mm/dd"/}
{/Style}
{Style ss:ID="s22"}
{NumberFormat ss:Format="yyyy/mm/dd\ h:mm:ss"/}
{/Style}
{Style ss:ID="s31"}
{NumberFormat ss:Format="[ENG][$-409]ddd"/}
{/Style}
{Style ss:ID="s32"}
{NumberFormat ss:Format="[$-F800]dddd\,\ mmmm\ dd\,\ yyyy"/}
{/Style}
{/Styles}
Then the usage of the styles in Columns:
{Column ss:StyleID="s21" ss:Width="53.25"/}
{Column ss:Index="4" ss:StyleID="s31" ss:Width="89.25"/}
{Column ss:StyleID="s22" ss:Width="95.25"/}
{Column ss:StyleID="s32" ss:Width="95.25"/}
First a few remarks about the ss:Styles:
A few remarks about the ss:Columns:
–jeroen
PS: Rob van Gelder posted a nice formula to show nice translations using Excel formatting.
Posted in Development, internatiolanization (i18n) and localization (l10), Software Development, XML, XML/XSD, XSD | Leave a Comment »
Posted by jpluimers on 2011/08/11
Recently, I blogged about the Excel XML Spreadsheet: Date.Type is mandatory.
Here is another error you can get:
XML ERROR in Worksheet Setting REASON: Bad Value FILE: V:\CAS400\docs\statistics.cascall-logs\cascall.JU03HV.Bobbe, P.J.L. (Paul).20110620.xml GROUP: Worksheet TAG: Table ATTRIB: ExpandedColumnCount VALUE: 9
This basically means your Worksheet.Table.ExpandedColumnCount is too small to hold your spreadsheet.
In other words: you either have more Worksheet.Table.Column definitions than ExpandedColumnCount, or you have a WorkSheet.Table.Row that has more WorkSheet.Table.Row.Cell entries than the ExpandedColumnCount.
In my case, I made an error generating too many Column definitions (by accidentaly duplicating some of them), and invalidated the ExpandedColumnCount.
Lesson learned: Since Excel will automatically calculate an absent ExpandedColumnCount, you can safely leave it out.
–jeroen
Posted in Development, Software Development, XML, XML/XSD, XSD | Leave a Comment »
Posted by jpluimers on 2011/07/28
When you generate Excel XML Spreadsheets, and you load it in Excel, it will report some errors in your Temporary Internet Files directory.
For instance, when you forget to fill the Data.Type attribute, then you get a log file with a message like this:
XML ERROR in Table REASON: Missing Tag FILE: V:\export.xml GROUP: Cell TAG: Data ATTRIB: Type
Note that some errors won’t be reported. For instance if you forget to put your Data in a Cell.Data (and put it in Cell); then Excel just show empty worksheet.
There seems to be no XSD for the XML Spreadsheet format, so you have to get yourself familiar with the XML in Excel and the Spreadsheet Component documentation on MSDN.
You can view where to put your stuff in the XML Spreadsheet Tag Hierarchy. That list doesn’t have individual links to the tags, you need the XML Spreadsheet Reference for that.
To make things more practical for myself, I perfomed these steps:
Even with that, you will need to accommodate for many peculiarities.
Hopefully I will find some time to write more those down soon.
The first is ss:Data:
–jeroen
Posted in .NET, Development, Software Development, XML, XML/XSD, XSD | 3 Comments »
Posted by jpluimers on 2011/01/18
In the past I wrote a few blog posts on posting sourcecode in WordPress.
Nick Hodges‘ last Flotsam and Jetsam blog post pointed me to the SyntaxHighlighter JavaScript that is used by WordPress and many other engines/sites.
Their site contains an even more elaborate list of supported languages.
I had the basic list right in my last post, but was missing all the aliases (which often are easier than the longer proper names).
This is the new table adapted from their list: Read the rest of this entry »
Posted in .NET, Batch-Files, C#, CSS, Database Development, Delphi, Delphi for PHP, Development, HTML, HTML5, Java, PowerShell, RegEx, Scripting, SQL, VBS, Web Development, WordPress, XML, XML/XSD, XSD | 5 Comments »
Posted by jpluimers on 2010/11/23
Quite a while ago, I wrote about the XSD.EXE tool to generate wrapper classes from an XSD file.
Recently, I had to create an XSD based on some XML.
Actually: a client was implementing a tool, that could export some of the data as XML.
That XML had to go into their database.
But the tool vendor told the client that the underlying XSD was ‘not supported’ (odd: why allow exporting XML and then not provide something supporting as the XSD?).
Anyway, the data was not that difficult, but having an XSD at hand made the import process a lot easier.
So lets see how to get a starting XSD from an of XML files (in practice, you would do this with a couple of XML files, then collect the best pieces into your final XSD). Read the rest of this entry »
Posted in .NET, Delphi, Development, Software Development, XML, XML/XSD, XSD | 11 Comments »
Posted by jpluimers on 2010/11/03
I tried searching for an XSD or other schema that describes ASX (Advanced Stream Redirector) files, but somehow could not find them.
The ASX files can be used to generate a playlist, but they are a bit richer in content than the WPL (Windows Media Player Playlist) file format.
So here is a post with some references to ASX files, examples, documentation and an XSD you could use for ASX files, and why ASX is not valid XML, it is just well-formed. Read the rest of this entry »
Posted in .NET, C#, Delphi, Development, Software Development, XML, XML/XSD, XSD | 2 Comments »