DOCX - what is the difference between none and nil?
-
samedi 28 avril 2012 23:11
I think none may be revert to the table (when used in a cell) setting while nil means no border???
thanks - dave
Who will win The International Collegiate Programming Championships?
Toutes les réponses
-
dimanche 29 avril 2012 17:26Modérateur
Hello DavidThi808,
Thank you for your inquiry about office open xml protocols. One of the Open specifications team member will contact you shortly.
Regards,
Sreekanth Nadendla
Microsoft Windows Open specifications -
lundi 30 avril 2012 19:42Modérateur
Hey Dave,
are you referring to 17.18.2 ST_Border:
nil (No Border) Specifies that no border shall be applied to the current item.
none (No Border) Specifies that no border shall be applied to the current item.Tom
-
lundi 30 avril 2012 19:49
Hi;
Yes, that's the one. We're trying to figure out what's going on with some borders and it looks like none turns off the table border setting, but it then reverts to the style border setting. I assume that nil and none have different meanings as they would not need both otherwise. Do you know what the difference is?
I can also post the docx file that illustrates this but I was trying to minimize the work at your end.
??? - thanks - dave
Who will win The International Collegiate Programming Championships?
-
lundi 30 avril 2012 19:55Modérateur
That's fine, go ahead and post the sample file if you don't mind. I'll look into it.
Tom
-
lundi 7 mai 2012 23:11
-
mercredi 9 mai 2012 19:28Modérateur
Dave,
I apologize for the delay.
If a cell border has collision with a table border Word will use the following rules in order to resolve the collision:
• If the cell border is defined as “nil”, the cell border wins and the table border is discarded.
• If the cell border is omitted or is defined as “none”, the table border wins and the cell will have whatever border that is defined by the table.Hopefully this clarifies the difference for you. We will be updating the implementer notes on this section.
Best regards,
Tom Jebo
Escalation Engineer
Microsoft Open Specifications- Proposé comme réponse Tom JeboMicrosoft Employee, Moderator mercredi 9 mai 2012 19:28
- Marqué comme réponse DavidThi808 mercredi 9 mai 2012 22:52
- Non marqué comme réponse DavidThi808 jeudi 7 juin 2012 15:25
- Non proposé comme réponse DavidThi808 jeudi 7 juin 2012 15:25
-
mercredi 9 mai 2012 21:20
Hi Tom;
As nil generally is used with no other settings, is it safe to say that nil generally means no border while none means revert up to the table border?
thanks - dave
Who will win The International Collegiate Programming Championships?
-
mercredi 9 mai 2012 22:24Modérateur
Yes, if the cell shares a border with the table then that is true and defines Word behavior.
Tom
- Marqué comme réponse DavidThi808 mercredi 9 mai 2012 22:52
- Non marqué comme réponse DavidThi808 jeudi 7 juin 2012 15:25
-
mercredi 9 mai 2012 22:53
Thank you.
ps - Can you update the DOCX spec for others?
Who will win The International Collegiate Programming Championships?
-
mercredi 9 mai 2012 23:46Modérateur
Yes, we will be updating the implementer notes.
Tom
-
jeudi 7 juin 2012 15:30
Hi Tom;
I think I've found an example that doesn't match this. Please take a look at the file http://www.windward.net/temp/Bug_1427.docx
There is no cell border defined, so looks to table.
The table border is w:val="none", so looks to style.
The TableGrid style border is <w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
But Word displays it with no border. Does none have a different meaning from table to style?
thanks - dave
Who will win The International Collegiate Programming Championships?
-
jeudi 7 juin 2012 17:39Modérateur
Ok, I'll take a look.
Tom
-
mardi 12 juin 2012 17:27
Hi Tom;
Any answer on this yet? We're suddenly getting a ton of queries where we are facing this issue. I'm guessing a recent service pack for Word changed what it is doing for this and we're now seeing it.
Consistently it's that the table is set to none and the style has a border. But Word does not display the border. I can provide more samples if needed.
This is a very urgent issue for us.
??? - thanks - dave
Who will win The International Collegiate Programming Championships?
-
mardi 12 juin 2012 19:01Modérateur
I'm checking Dave.
Tom
-
mardi 12 juin 2012 20:18Modérateur
The rules we discussed above were specific to the relationship between cell and table definition. They do not apply to the relationship between table and style.
17.4.39 tblBorders (Table Borders):
“If this element is omitted, then this table shall have the borders specified by the associated table style. If no borders are specified in the style hierarchy, then this table shall not have any table borders.”Since the table in your document specifies a border of "none", the style is not effective. If you omit the tblBorder element in the table definition, then the TableGrid style would take effect.
Does that make sense?
Tom
-
mardi 12 juin 2012 20:21
Hi Tom;
That is what it looked like to me so yes it makes sense. I asked you for verification because it goes against how everything flows up if not set.
To confirm, none in a cell means use table. none in a table is identical to nil (ie border off).
And while I haven't seen it, if we have none in a style and it has a based-on style, is that also nil (ie off) or is that use the based on setting?
thank you very much for the fast turn around. We have 4 customers waiting on this.
thanks - dave
Who will win The International Collegiate Programming Championships?
-
mardi 12 juin 2012 20:38
Hi Tom;
And for paragraph borders is none off (nil) or is it defer to style?
thanks - dave
Who will win The International Collegiate Programming Championships?
-
mercredi 13 juin 2012 18:18Modérateur
replying to your last two posts:
>>To confirm, none in a cell means use table.
this is only true when there’s a conflict (i.e. spacing is 0)>>none in a table is identical to nil (ie border off).
in a non-conflict scenario, nil means ??? (Amir, is this true, none == nil?) A none conflict scenario they have the same result which is no border will be drawn>>And while I haven't seen it, if we have none in a style and it has a based-on style, is that also nil (ie off) or is that use the based on setting?
In L.1.8.9 Style Inheritance:
“To build up the resulting style, a consumer shall trace the hierarchy (following each basedOn value) back to a
style which has no basedOn element (is not based on another style). The resulting style is then constructed by
following each level in the tree, applying the specified paragraph and/or character properties as appropriate.
When properties conflict, they are overridden by each subsequent level (this includes turning OFF a property set
at an earlier level). Properties which are not specified simply do not change those specified at earlier levels.”So whatever you define as a value for a property will override the previous style value. This means that if your table style defines this property as none and it is based on a table style which define borders for the table, you still will get a table with no border since none will override whatever the previous value was.
>>And for paragraph borders is none off (nil) or is it defer to style?
Yes none (nil) will turn paragraph border off, it doesn’t revert back to style.
Does that help?
Tom
-
jeudi 14 juin 2012 15:22
Hi Tom;
Thanks for the reply. I'm still unsure on a couple of items.
1. none in a cell "is only true when there’s a conflict" - do you mean different values between the cell and table settings? If so, when they match isn't it then irrelevant? Or do you mean something else where it will matter which we use but it's specific attributes that must not match?
2. Once Amir answers can you post here?
3. I understand the styles using the hierarchy. If there is no border setting and we hit a style with nil, then that border is off regardless of parent style settings. My question is if we have no setting and hit a style with none, does it keep looking at (grand)parents or is that identical to nil and it is off and stops looking at that?
thanks - dave
Who will win The International Collegiate Programming Championships?
-
vendredi 15 juin 2012 09:51Modérateur
Dave,
1. Conflict is defined by the standard as when the cell spacing is 0. That is what I meant by conflict.
2. Sorry, I accidentally included that question; the answer was already given: A non-conflict scenario they have the same result which is no border will be drawn which confirms your assertion.
3. No, it does not keep looking; it stops and displays a table with no border.
Tom
- Proposé comme réponse Tom JeboMicrosoft Employee, Moderator vendredi 15 juin 2012 09:51
- Marqué comme réponse DavidThi808 vendredi 15 juin 2012 15:56
-
vendredi 15 juin 2012 15:57
Ok, thanks. I think we've got this.
When you write it up, please put in a couple of examples because this is not simple :)
Who will win The International Collegiate Programming Championships?
-
lundi 19 novembre 2012 17:06
Hi Tom;
Has this clarification been written up yet? I think we have something slightly wrong on this and it would help to read the revised notes on this if they exist.
thanks - dave
Who will win The Windward International Collegiate Programming Championships?

