In Umbraco 4.1 the XML Schema is new, but why has this been done? Is it faster when using XSLT? If I look at these examples the XSLT looks less readable. What are the main arguments for the new XML Schema?
The new schema is faster and more well-defined. I think some of the samples in the wiki are harder than they look - I'll come with some feedback. When you start working with the new schema you'll also find that it's much easier to read and understand.
The current very generic schema was one of the things that scared most new people away. With the new schema we're able to start having intellisense in Visual Studio, XMLSpy, etc, increase performance and readability. Of course it'll always take some time when you've gotten used to something else but we think it's the right way forward.
This new schema will be the only one in v5 so we thought it was the best to start the transition now.
Thats what I though(/found on the internet) but in my \data directory there is only 1 directory called "vistadb" which has a file named "_placeholder", no extension idd.
I thought about decreasing xml file size and I'm disappointed.
In previous versions all property data have declaration:
<data alias="propertyAlias"> </data>
Now in 4.5:
<propertyAlias> </propertyAlias>
It is simple way to count the character length in both solutions. Lets set the x variable like the propertyAlias length. Then we have two linear function which shows the total property "declaration" length:
I: x + 22 = 0 II: 2x + 5 = 0
This function have own solution(point):
x + 22 = 2x + 5 x = 17
So, when the propertyAlias length is more than 17 characters then the new schema contains more space.
In my situation most of the propery aliases are longer than 17 characters...
If you worry about file sizes in KB in 2010 you're trying to identify a wrong issue :)
In return for something that *might* take up a few extra bytes (let's say we have a site with 10.000 nodes, average of 10 properties per node and avg alias of 20, then it'll be 300kb extra data.or a 7% increase in *definition* size) compared to the ease of use of the new schema and the more stronger typing then I'd gladly have given away double (100%) in increase.
My umbraco.config file size is now 40MB, a I would like to import extra 6.000 nodes and I'm worying about Application Pool time to start and etc...
I have another question:
Could you tell me what methods are called when upgrading takes place to new xml schema? I think that in this transformation all published content is recreated and inserted to cmsContentXml.
I removed some properties of published nodes and they are still in xml cache... So I would like to recreate cmsContentXml...
What do you think about not saving empty properties to xml cache, it is possible?
Why a new XML Schema?
Hello,
In Umbraco 4.1 the XML Schema is new, but why has this been done? Is it faster when using XSLT? If I look at these examples the XSLT looks less readable. What are the main arguments for the new XML Schema?
Jeroen
The new schema is faster and more well-defined. I think some of the samples in the wiki are harder than they look - I'll come with some feedback. When you start working with the new schema you'll also find that it's much easier to read and understand.
The current very generic schema was one of the things that scared most new people away. With the new schema we're able to start having intellisense in Visual Studio, XMLSpy, etc, increase performance and readability. Of course it'll always take some time when you've gotten used to something else but we think it's the right way forward.
This new schema will be the only one in v5 so we thought it was the best to start the transition now.
One argument is file size (which also negates to space taken up in memory) as the schema
Takes up less space than
Times that by a few thousand nodes, and thats a significant saving.
Matt
Thanks for the explanation. Both answers are logically :).
Jeroen
Is there a reason why the member classes didn't get upgraded to the new style?
Ok, this question will sound stupid but, where can I find the .xml file for my current scheme? I want to check it so I can use that to make my xpaths.
@Bryan: If I got you right, /data/umbraco.config should be what you're looking for...
Hey atze,
Thats what I though(/found on the internet) but in my \data directory there is only 1 directory called "vistadb" which has a file named "_placeholder", no extension idd.
So... yeah.. :D
In Umbraco 4.5 it's in App_Data/umbraco.config
Thats it Jeroen!
I knew I've seen it somewhere ;)
Hi Niels,
I have one more idea how to decrease xml file size. When we go trough the xml file we can see that there are also empty properties.
I think that document with empty property is the same like without this property.
All is contained in Property.ToXml function when it is posible to test when the property is empty. For example:
I thought about decreasing xml file size and I'm disappointed.
In previous versions all property data have declaration:
Now in 4.5:
It is simple way to count the character length in both solutions.
Lets set the x variable like the propertyAlias length. Then we have two linear function which shows the total property "declaration" length:
I: x + 22 = 0
II: 2x + 5 = 0
This function have own solution(point):
x + 22 = 2x + 5
x = 17
So, when the propertyAlias length is more than 17 characters then the new schema contains more space.
In my situation most of the propery aliases are longer than 17 characters...
If you worry about file sizes in KB in 2010 you're trying to identify a wrong issue :)
In return for something that *might* take up a few extra bytes (let's say we have a site with 10.000 nodes, average of 10 properties per node and avg alias of 20, then it'll be 300kb extra data.or a 7% increase in *definition* size) compared to the ease of use of the new schema and the more stronger typing then I'd gladly have given away double (100%) in increase.
Thanks Niels,
My umbraco.config file size is now 40MB, a I would like to import extra 6.000 nodes and I'm worying about Application Pool time to start and etc...
I have another question:
Could you tell me what methods are called when upgrading takes place to new xml schema? I think that in this transformation all published content is recreated and inserted to cmsContentXml.
I removed some properties of published nodes and they are still in xml cache... So I would like to recreate cmsContentXml...
What do you think about not saving empty properties to xml cache, it is possible?
is working on a reply...