I'm working on a project where the display text of a View contains the labels in standard uppercase formate for humans to consume. I created another display to provide as an XML document but the labels as XML tags need to be lowercase. Instead of having to override all fields, it would be nice to just transform the existing labels to lowercase.

I'm working on a patch to provide this functionality and I'll post it here soon.

Thanks.

Comments

minoroffense’s picture

Title: Add option to transform label text to lower case in XML plugin » Add option to transform label text case in XML plugin
minoroffense’s picture

Status: Active » Needs review
StatusFileSize
new2.12 KB

Here's the patch. You'll find the new options in the XML form settings.

minoroffense’s picture

Title: Add option to transform label text case in XML plugin » Add option to transform label text case in XML plugin and customize root node and item node tags
StatusFileSize
new5.9 KB

I've extended the patch a bit. This allows custom root and item nodes in case the user doesn't want to use the base table and/or entity type as the tags in their XML.

littlepixiez’s picture

Hi there... I don't suppose you could help me? I've patched everything successfully but I can't find any extra options in the XML form? Where should I be looking for this? (in the View?)

I can override the tags with labels for the fields, but I need to replace the overall envelope with ....

minoroffense’s picture

The options are in the style settings. When you set your display to us XML, the settings link next to that should list the options stated above.

Same place where you would go if you had selected HTML List and you wanted to configure what kind of HTML list.

steven jones’s picture

Status: Needs review » Closed (duplicate)

The XML node names was handled in this issue: #1218896: Specify XML Root elements in views_data_export? as for the transforming of case of the labels, hmm...I think that I'm okay with just making people change them all manually.