XSLT Number Formatting Notes

XSLT No Comments »

When using XSLT’s format-number() function to format a decimal, consider using a zero in the least significant place of the decimal part of your format string. This will allow a number with a 0 integer part to display correctly.

For example:

Number format-number using #,### format-number using #,##0
12345 12,345 12,345
5 5 5
0 No output! 0

This also applies to decimals:

Number format-number using #.00 format-number using 0.00
5 5.00 5.00
0 .00 (Note no leading 0) 0.00
0.1234 .12 (Note no leading 0) 0.12

Implementing IXmlWriter Series

C++, XML No Comments »

While I had originally planned on stretching out my Implementing IXmlWriter series of posts into at least three or four more posts, I’ve decided to end it here. Here is a list of the posts in the series:

Off the top of my head, here are a few things left to implement:

  • Processing instructions
  • Doc type declarations
  • CDATA declarations
  • Entity references
  • Character entities
  • Character encodings (e.g. UTF-8, UTF-16, etc.)
  • Robust error handling, such as throwing an exception if WriteAttribute() is called with an illegal character

Update: 2007-07-11 10:58 PM: Microsoft’s XmlLite provides all this and more for Windows developers.

Implementing IXmlWriter Part 14: Supporting Writing To A Stream

C++, XML No Comments »

Today I will add support for writing the generated XML to a C++ stream to last time’s IXmlWriter.

Read the rest of this entry »

Implementing IXmlWriter Part 13: Putting IXmlWriter Behind A Pimpl Firewall

C++, XML No Comments »

As the private members of IXmlWriter are getting too numerous and too likely to change by my judgment, today I will put last time’s IXmlWriter behind a compilation firewall (pimpl).

Read the rest of this entry »

Implementing IXmlWriter Part 12: Supporting Pretty-Printing

C++, XML No Comments »

Today I will add support for pretty-printing to last time’s IXmlWriter.

Read the rest of this entry »

Implementing IXmlWriter Part 11: Supporting Namespaces

C++, XML No Comments »

Today I will add support for namespaces to last time’s IXmlWriter.

Read the rest of this entry »

Implementing IXmlWriter Part 10: Supporting WriteComment()

C++, XML No Comments »

Today I will add support for the function WriteComment() to last time’s IXmlWriter.

Read the rest of this entry »

Implementing IXmlWriter Part 9: Supporting WriteStartDocument() and WriteEndDocument()

C++, XML No Comments »

Today I will add support for the functions WriteStartDocument() and WriteEndDocument() to last time’s IXmlWriter.

Read the rest of this entry »

Implementing IXmlWriter Part 8: Supporting WriteStartAttribute() and WriteEndAttribute()

C++, XML No Comments »

Today I will add support for the functions WriteStartAttribute() and WriteEndAttribute() to last time’s IXmlWriter.

Read the rest of this entry »

Implementing IXmlWriter Part 7: Cleaning Up

C++, XML No Comments »

Wow, I can’t believe that it’s been over a month already since my last IXmlWriter post. I guess my vacation ruined my exercise plan and my blogging habits. It’s well past time to get back into both.

Rather than introduce a new test case, I’m going to spend today “cleaning up” the previous version of IXmlWriter.

Read the rest of this entry »

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in