Draft for review: ISO 8601 date work on IS 29500

MURATA Makoto (FAMILY Given) eb2m-mrt at asahi-net.or.jp
Wed Jul 28 01:15:19 CEST 2010


> My apologies - it's the child element, yes. You're correct in your assumption regarding @t.

OK.  @t specifies types and <v> contains values.  Permissible values of
<v> are controlled by @t.  Such interdependencies can be precisely 
captured in RELAX NG. 

>b (Boolean): Cell containing a boolean.
>d (Date): Cell contains a date in the ISO 8601 format.
>e (Error): Cell containing an error.
>inlineStr (Inline String): Cell containing an (inline) rich string
>n (Number): Cell containing a number.
>s (Shared String): Cell containing a shared string.
>str (String): Cell containing a formula string.


Currently, sml.rnc has two definitions as follows:

sml_CT_Cell =
  attribute r { sml_ST_CellRef }?,
  
  ## default value: 0
  attribute s { xsd:unsignedInt }?,
  
  ## default value: n
  attribute t { sml_ST_CellType }?,
  
  ## default value: 0
  attribute cm { xsd:unsignedInt }?,
  
  ## default value: 0
  attribute vm { xsd:unsignedInt }?,
  
  ## default value: false
  attribute ph { xsd:boolean }?,
  element f { sml_CT_CellFormula }?,
  element v { s_ST_Xstring }?,
  element is { sml_CT_Rst }?,
  element extLst { sml_CT_ExtensionList }?
sml_ST_CellType =
  string "b"
  | string "d"
  | string "n"
  | string "e"
  | string "s"
  | string "str"
  | string "inlineStr"

They should be replaced with something like

sml_CT_Cell =
  attribute r { sml_ST_CellRef }?,
  
  ## default value: 0
  attribute s { xsd:unsignedInt }?,
  
  ## default value: 0
  attribute cm { xsd:unsignedInt }?,
  
  ## default value: 0
  attribute vm { xsd:unsignedInt }?,
  
  ## default value: false
  attribute ph { xsd:boolean }?,
  sml_typeDesignatorAndContents,
  element extLst { sml_CT_ExtensionList }?


sml_typeDesignatorAndContents = 
  (attribute t { string "b"},  element v { xsd:bool })
  | (attribute t { string "d"}, element v { xsd:date })
  | (attribute t { string "n"}?, element v { xsd:long | xsd:float })
  | (attribute t { string "e"}, element v { s_ST_Xstring })
  | (attribute t { string "s"}, element v { s_ST_Xstring })
  | (attribute t { string "str"}, element v { s_ST_Xstring },
                                  element f { sml_CT_CellFormula }?)
  | (attribute t { string "inlineStr"}, element is { sml_CT_Rst })

I have some questions, though. 
- Is <f> allowed only when @t="str"?
- Is <is> allowed only when @t="inlineStr"?
- When @t="e" or "s", what is allowed as children?

I think that we should do the same thing to CT_CellFormula and 
ST_CellFormulaType.

Cheers,
Makoto


More information about the sc34wg4 mailing list