Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1892

Show
Ignore:
Timestamp:
07/21/07 12:51:36 (1 year ago)
Author:
nahi
Message:
  • added classes for rest built-in datatypes of XML Schema Datatypes (NMTOKEN, NMTOKENS, Name, NCName, ID, IDREF, IDREFS, ENTITY, and ENTITIES). lexical scope is not checked for these datatypes yet. closes #340.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/soap/baseData.rb

    r1857 r1892  
    256256  extend SOAPModuleUtils 
    257257  SOAPENCType = QName.new(EncodingNamespace, LanguageLiteral) 
     258end 
     259 
     260class SOAPNMTOKEN < XSD::XSDNMTOKEN 
     261  include SOAPBasetype 
     262  extend SOAPModuleUtils 
     263  SOAPENCType = QName.new(EncodingNamespace, NMTOKENLiteral) 
     264end 
     265 
     266class SOAPNMTOKENS < XSD::XSDNMTOKENS 
     267  include SOAPBasetype 
     268  extend SOAPModuleUtils 
     269  SOAPENCType = QName.new(EncodingNamespace, NMTOKENSLiteral) 
     270end 
     271 
     272class SOAPName < XSD::XSDName 
     273  include SOAPBasetype 
     274  extend SOAPModuleUtils 
     275  SOAPENCType = QName.new(EncodingNamespace, NameLiteral) 
     276end 
     277 
     278class SOAPNCName < XSD::XSDNCName 
     279  include SOAPBasetype 
     280  extend SOAPModuleUtils 
     281  SOAPENCType = QName.new(EncodingNamespace, NCNameLiteral) 
     282end 
     283 
     284class SOAPID < XSD::XSDID 
     285  include SOAPBasetype 
     286  extend SOAPModuleUtils 
     287  SOAPENCType = QName.new(EncodingNamespace, IDLiteral) 
     288end 
     289 
     290class SOAPIDREF < XSD::XSDIDREF 
     291  include SOAPBasetype 
     292  extend SOAPModuleUtils 
     293  SOAPENCType = QName.new(EncodingNamespace, IDREFLiteral) 
     294end 
     295 
     296class SOAPIDREFS < XSD::XSDIDREFS 
     297  include SOAPBasetype 
     298  extend SOAPModuleUtils 
     299  SOAPENCType = QName.new(EncodingNamespace, IDREFSLiteral) 
     300end 
     301 
     302class SOAPENTITY < XSD::XSDENTITY 
     303  include SOAPBasetype 
     304  extend SOAPModuleUtils 
     305  SOAPENCType = QName.new(EncodingNamespace, ENTITYLiteral) 
     306end 
     307 
     308class SOAPENTITIES < XSD::XSDENTITIES 
     309  include SOAPBasetype 
     310  extend SOAPModuleUtils 
     311  SOAPENCType = QName.new(EncodingNamespace, ENTITIESLiteral) 
    258312end 
    259313 
  • trunk/lib/soap/mapping/typeMap.rb

    r1840 r1892  
    1717  XSD::XSDToken::Type => SOAPToken, 
    1818  XSD::XSDLanguage::Type => SOAPLanguage, 
     19  XSD::XSDNMTOKEN::Type => SOAPNMTOKEN, 
     20  XSD::XSDNMTOKENS::Type => SOAPNMTOKENS, 
     21  XSD::XSDName::Type => SOAPName, 
     22  XSD::XSDNCName::Type => SOAPNCName, 
     23  XSD::XSDID::Type => SOAPID, 
     24  XSD::XSDIDREF::Type => SOAPIDREF, 
     25  XSD::XSDIDREFS::Type => SOAPIDREFS, 
     26  XSD::XSDENTITY::Type => SOAPENTITY, 
     27  XSD::XSDENTITIES::Type => SOAPENTITIES, 
    1928  XSD::XSDBoolean::Type => SOAPBoolean, 
    2029  XSD::XSDDecimal::Type => SOAPDecimal, 
     
    5362  SOAP::SOAPToken::Type => SOAPToken, 
    5463  SOAP::SOAPLanguage::Type => SOAPLanguage, 
     64  SOAP::SOAPNMTOKEN::Type => SOAPNMTOKEN, 
     65  SOAP::SOAPNMTOKENS::Type => SOAPNMTOKENS, 
     66  SOAP::SOAPName::Type => SOAPName, 
     67  SOAP::SOAPNCName::Type => SOAPNCName, 
     68  SOAP::SOAPID::Type => SOAPID, 
     69  SOAP::SOAPIDREF::Type => SOAPIDREF, 
     70  SOAP::SOAPIDREFS::Type => SOAPIDREFS, 
     71  SOAP::SOAPENTITY::Type => SOAPENTITY, 
     72  SOAP::SOAPENTITIES::Type => SOAPENTITIES, 
    5573  SOAP::SOAPBoolean::SOAPENCType => SOAPBoolean, 
    5674  SOAP::SOAPDecimal::SOAPENCType => SOAPDecimal, 
  • trunk/lib/xsd/datatypes.rb

    r1840 r1892  
    4949TokenLiteral = 'token' 
    5050LanguageLiteral = 'language' 
    51 #3.3.4 NMTOKEN 
    52 #3.3.5 NMTOKENS 
    53 #3.3.6 Name 
    54 #3.3.7 NCName 
    55 #3.3.8 ID 
    56 #3.3.9 IDREF 
    57 #3.3.10 IDREFS 
    58 #3.3.11 ENTITY 
    59 #3.3.12 ENTITIES 
     51NMTOKENLiteral = 'NMTOKEN' 
     52NMTOKENSLiteral = 'NMTOKENS' 
     53NameLiteral = 'Name' 
     54NCNameLiteral = 'NCName' 
     55IDLiteral = 'ID' 
     56IDREFLiteral = 'IDREF' 
     57IDREFSLiteral = 'IDREFS' 
     58ENTITYLiteral = 'ENTITY' 
     59ENTITIESLiteral = 'ENTITIES' 
    6060IntegerLiteral = 'integer' 
    6161NonPositiveIntegerLiteral = 'nonPositiveInteger' 
     
    10531053end 
    10541054 
     1055class XSDNMTOKEN < XSDToken 
     1056  Type = QName.new(Namespace, NMTOKENLiteral) 
     1057 
     1058  def initialize(value = nil) 
     1059    init(Type, value) 
     1060  end 
     1061 
     1062private 
     1063 
     1064  def screen_data(value) 
     1065    super 
     1066    # TODO: check lexical space and convert to a value 
     1067    value 
     1068  end 
     1069end 
     1070 
     1071class XSDNMTOKENS < XSDNMTOKEN 
     1072  Type = QName.new(Namespace, NMTOKENSLiteral) 
     1073 
     1074  def initialize(value = nil) 
     1075    init(Type, value) 
     1076  end 
     1077 
     1078private 
     1079 
     1080  def screen_data(value) 
     1081    # derived by list 
     1082    # TODO: check lexical space and convert to a value 
     1083    value 
     1084  end 
     1085end 
     1086 
     1087class XSDName < XSDToken 
     1088  Type = QName.new(Namespace, NameLiteral) 
     1089 
     1090  def initialize(value = nil) 
     1091    init(Type, value) 
     1092  end 
     1093 
     1094private 
     1095 
     1096  def screen_data(value) 
     1097    super 
     1098    # TODO: check lexical space and convert to a value 
     1099    value 
     1100  end 
     1101end 
     1102 
     1103class XSDNCName < XSDName 
     1104  Type = QName.new(Namespace, NCNameLiteral) 
     1105 
     1106  def initialize(value = nil) 
     1107    init(Type, value) 
     1108  end 
     1109 
     1110private 
     1111 
     1112  def screen_data(value) 
     1113    super 
     1114    # TODO: check lexical space and convert to a value 
     1115    value 
     1116  end 
     1117end 
     1118 
     1119class XSDID < XSDNCName 
     1120  Type = QName.new(Namespace, IDLiteral) 
     1121 
     1122  def initialize(value = nil) 
     1123    init(Type, value) 
     1124  end 
     1125 
     1126private 
     1127 
     1128  def screen_data(value) 
     1129    super 
     1130    # TODO: check lexical space and convert to a value 
     1131    value 
     1132  end 
     1133end 
     1134 
     1135class XSDIDREF < XSDNCName 
     1136  Type = QName.new(Namespace, IDREFLiteral) 
     1137 
     1138  def initialize(value = nil) 
     1139    init(Type, value) 
     1140  end 
     1141 
     1142private 
     1143 
     1144  def screen_data(value) 
     1145    super 
     1146    # TODO: check lexical space and convert to a value 
     1147    value 
     1148  end 
     1149end 
     1150 
     1151class XSDIDREFS < XSDIDREF 
     1152  Type = QName.new(Namespace, IDREFSLiteral) 
     1153 
     1154  def initialize(value = nil) 
     1155    init(Type, value) 
     1156  end 
     1157 
     1158private 
     1159 
     1160  def screen_data(value) 
     1161    # derived by list 
     1162    # TODO: check lexical space and convert to a value 
     1163    value 
     1164  end 
     1165end 
     1166 
     1167class XSDENTITY < XSDNCName 
     1168  Type = QName.new(Namespace, ENTITYLiteral) 
     1169 
     1170  def initialize(value = nil) 
     1171    init(Type, value) 
     1172  end 
     1173 
     1174private 
     1175 
     1176  def screen_data(value) 
     1177    super 
     1178    # TODO: check lexical space and convert to a value 
     1179    value 
     1180  end 
     1181end 
     1182 
     1183class XSDENTITIES < XSDENTITY 
     1184  Type = QName.new(Namespace, ENTITIESLiteral) 
     1185 
     1186  def initialize(value = nil) 
     1187    init(Type, value) 
     1188  end 
     1189 
     1190private 
     1191 
     1192  def screen_data(value) 
     1193    # derived by list 
     1194    # TODO: check lexical space and convert to a value 
     1195    value 
     1196  end 
     1197end 
     1198 
    10551199class XSDInteger < XSDDecimal 
    10561200  Type = QName.new(Namespace, IntegerLiteral)