We've made some changes connected to each other, so submitting this as a single patch. Changes:

  • Split preprocessing from printing in RAW XML, as it done for other XML schemas.
  • Replace html_entity_decode() with custom function, because original replaces not all entities defined in HTML and xHTML. This issue produced XML parsing errors in our case. Also, custom function removes unknown entities to be 100% sure there will be no problems with content.
  • Add options to insert custom XML code before first top-level child and after last one. Probably it should be ported to other XML output styles.
  • Wrap preview output with <pre> tag to preserve formatting.

Also, we're using fix for this problem (similar to patch submitted to issue): #985696: empty fields don't get rendered by _views_xml_render_fields()

Modified module fits our requirements, but still have some problems. I'd be happy if these changes will be included to upstream project, but I need maintainer's opinion about it to continue development.

Patch was made from latest stable 6.x-1.0-beta2.

Comments

zeip’s picture

Category: Bug report » Task
Issue summary: View changes