From miaowang.tw at gmail.com Tue Aug 23 20:14:53 2022 From: miaowang.tw at gmail.com (Miao Wang) Date: Fri Aug 26 02:13:45 2022 Subject: [xsd-users] Output lowercase HexBinary In-Reply-To: References: Message-ID: Hello Boris, I tried the calendar example. When I ran xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue '#include "xml-schema-custom.hxx"' xml-schema.xsd it display error: --extern-xml-schema is required when compiling more than one schema and --generate-xml-schema is specified So, what should I do to run the example? Thank you, Miao. [image: width=] ??????www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> Boris Kolpackov ? 2022?6?6? ?? ??6:56??? > Miao Wang writes: > > > Because the hexbinary in kml examples found on webs are all in lowercase > > (ex: ff7faaaa), is there any way to output the hexbinary in lowercase. > > You can probably achieve this by customizing the hexBinary type: > > > http://wiki.codesynthesis.com/Tree/Customization_guide#Customizing_the_XML_Schema_built-in_types > > (There are also some examples of customizing the built-in types). > From boris at codesynthesis.com Fri Aug 26 02:32:33 2022 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Aug 26 02:27:26 2022 Subject: [xsd-users] Output lowercase HexBinary In-Reply-To: References: Message-ID: Miao Wang writes: > I tried the calendar example. When I ran > > xsd cxx-tree --generate-xml-schema --custom-type date --hxx-epilogue > '#include "xml-schema-custom.hxx"' xml-schema.xsd > > it display > > error: --extern-xml-schema is required when compiling more than one schema > and --generate-xml-schema is specified > > So, what should I do to run the example? You need to adjust the quoting in the above example (I am guessing you are on Windows). See the "REGEX AND SHELL QUOTING" section in xsd(1) for details: https://codesynthesis.com/projects/xsd/documentation/xsd.xhtml I would suggest that you make use of the --options-file mechanism. From miaowang.tw at gmail.com Fri Aug 26 08:58:12 2022 From: miaowang.tw at gmail.com (Miao Wang) Date: Mon Aug 29 09:36:27 2022 Subject: [xsd-users] Output lowercase HexBinary In-Reply-To: References: Message-ID: > > Hello Boris, > > Thank you for the instructions. > > I finally got what I want, but not using the customizing method. > Because I want to write lowercase alphabet for hexBinary, I simply modify > line 440 at types.txx from uppercase to lowercase, i.e., > > change > const char tab[] = "0123456789ABCDEF"; > to > const char tab[] = "0123456789abcdef"; > > Then I got lowercase hexBinary in the output KML file. > > By the way, > When I test the calendar example, only parameter [--custom-type date] > works, i.e., change > > typedef ::xsd::cxx::tree::date< char, simple_type > date; > to > class data; > > but when I change the type "date" to other types such as "hex_binary" or > "date_time", the output xml-schema.hxx does not change. > > BR, > > Miao >