Open napernik opened 8 years ago
Wouldn't that make the parsing of Datastores more memory consuming, since the Content is now treated as XElement's, instead of a simple string?
And how would you know if a Content-property contains actual xml or just text or base64 encoded binary data?
And how would you know if a Content-property contains actual xml or just text or base64 encoded binary data?
We can f.e. introduce an extra attribute for that, when it is present, the provider would attempt to save the field in an xml friendly way.
Wouldn't that make the parsing of Datastores more memory consuming, since the Content is now treated as XElement's, instead of a simple string?
It is not necessarily a significant difference to use some extra CPU/memory compare to the actual time writing to file system. On the upside, the file sizes could actually be a bit smaller, as there won't be a need to encode all the characters.
Yet another attribute :) Looking at how EF does it, best would be to introduce a new StoreFieldType
ala [StoreFieldType(PhysicalStoreFieldType.Xml)]
The SQL dataprovider would then also use the XML datatype for the table column, as MS SQL supports xml as a native type.
At the moment XmlDataProvider encodes xml fields, which makes it hard to
1) read/copy/manually modify it when needed 2) see the diffs in the case the file is version controlled
Example:
<PagePlaceholderContentElements PublicationStatus="published" ChangeDate="2015-09-29T12:56:21.5674048+02:00" ChangedBy="admin" PageId="3a613405-9990-47a6-8f00-672a8e6de9e7" PlaceHolderId="start" Content="<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	</head>
	<body>
				<f:function name="Composite.Web.Html.Template.PageTemplateFeature" xmlns:f="http://www.composite.net/ns/function/1.0">
			<f:param name="FeatureName" value="Content Start" />
		</f:function>
	</body>
</html>" SourceCultureName="en-US" />
Suggested format: