Standards for Technology in Automotive Retail (STAR) is a nonprofit, dues-paying organization whose members include dealers, manufacturers, business system providers, and automotive related industry organizations. More....
As a member of STAR, you will have the opportunity to help develop voluntary industry information technology (IT) standards, which can improve the operational performance, effectiveness, timeliness and competitiveness of your company and it’s business partners...More...
1.0 XML Faqs 1.1 What are some commonly asked XML questions? 1.2 Character Encoding and the XML Declaration 2.0 Enumerated Lists 2.1 Why do I have to map my legacy code list to the STAR Code List? 3.0 OAGI 3.1 I found an OAGIS BOD that I would like STAR to use. How is this done? 4.0 Data Binding 4.1 Tool Compatibility? 4.2 Data Binding Tools 5.0 Performance 5.1 How can I improve performance? 5.2 How do I precompile or cache a schema using Xerces? 5.3 How do I precompile or cache a schema using Microsoft .NET framework? 5.4 How do I precompile or cache a schema using SAXON for JAVA? 5.5 How do I precompile or cache a schema using SAXON for .NET? 5.6 How do I precompile or cache a schema using JAXP 1.3? 6.0 Sample XML 6.1 It would be useful to see a sample of an XML file that would successfully validate against the STAR schema. 7.0 Validation 7.1 What are the recommended parser to use for validation? 7.2 Validation Errors with PHP 5? 8.0 XML Schema Parser Messages 8.1 XML Spy Messages 9.0 Schema Formats 9.1 Developer versus Standalone? 10.0 STAR 4 to STAR 5 10.1 Versioning 10.2 Verb Usage 10.3 Platform Implementation of STAR 5
1.0 XML FAQs
1.1 What are some commonly asked XML questions?
Question 1.) Where can Frequently Asked Questions for XML be found?
Answer: A very good source for general XML related questions can be found at the XML FAQs website.
Question 2.) What are Namespaces and how are they used?
Answer: Common answers for Namespaces and their use can be found at the XML Namespaces FAQ.
Question 3.) Where can Frequently Asked Questions for XML Schema be found?
Answer: Common answers for general schema problems can be found at the XML Schema FAQ.
1.2 Character Encoding and the XML Declaration
Question 1.) How do I make sure the character encoding I set in the XML Declaration is being honored by the receiver or processing application?
Answer: You can't ever guarantee that it will be honored, but you can provide a strong hint on what the receiver or processing application will do with your file. According to RFC3023 Section 3 the way the content-type is set will affect how the XML may be handled by the receiver or processor:
Content-type: text/xml; charset="utf-8"
Content-type: application/xml; charset="utf-16"
Question 2.) What are the recommended encodings to use for STAR BODs?
Answer: STAR recommends using either UTF-8 or UTF-16 for the encoding. All XML parsers are required to support these encodings according to the XML Specifications. These are the only ones that they are required to support, others may be supported but aren't guaranteed to be supported.
2.0 Enumerated Lists
2.1 Why do I have to map my legacy code list to the STAR Code List?
Question 1.) Some of the STAR code lists that I would like to use do not match my legacy system's code lists. For example, my Part Order Types are identified with signal digit codes (1 = Stock, 2 = Rush, etc) and the STAR codes use three character Part Order Types (STK = Stock, RUS = Rush, etc.). How can I implement the standard if the code list doesn't match my system?
Answer It is the goal of STAR to develop standard enumerated lists where possible to increase interoperability. In many cases, systems have code lists that have been in place for years and there are no plans to change them. In those cases, the implementer will be responsible for translating the STAR code list that comes to their legacy code list and vice verse when the code list is being sent out by the implementer.
3.1 I found an OAGIS BOD that I would like STAR to use. How is this done?
Question 1.) I have found a BOD in the OAGIS repository that meet my organization's needs. How can we incorporate that BOD into the STAR standards?
Answer It is the goal of STAR to leverage OAGIS standards as much as possible where it is applicable. If there is an OAGIS BOD that meets a STAR member's needs, the member should submit the following:
1. A modification request indicating the OAGIS BOD to be included. NOTE: STAR does not support the OAGIS User Area, so if there are additional field requirements need for the BOD those should also be included on the modification request.
2. A use case form indicating the use case that the OAGIS BOD will satisfy
3. A sequence diagram indicating how the member will use the Noun/Verb combinations to support the use case.
4.0 Data Binding
4.1 Tool Compatibility?
Question 1.) What tools have been tested and known to work with STAR Schemas?
Answer: STAR has tested their Schemas with the following tools:
*JAXB 2.0 - STAR does not recommend versions of JAXB prior to version 2.0. *XMLBeans 1.4 or greater. *XSDObjectGen for .NET (STAR 4 Schemas) *LiquidXML for C#, JAVA, VB.NET, C++ *XML SPY Enterprise - C#, JAVA, C++
Other tools may work, but these are the ones STAR data architects have tested. If you know of another framework that works, please let us know.
4.2 Data Binding Tools
Question 1.) Where can I find out more about data binding for XML Schemas?
Answer: The XML Data Binding Resources article by Ronald Bourret is a good source on data binding and XML.
5.1 How can I improve performance?
Question 1.) Do you have any tips for improving performance?
Answer: There are various ways to improve performance when using XML:
Only send what you need. Each STAR BOD has a limited number of required fields and a several optional fields. It is not necessary to send empty tags for fields that are not required and that you do not need.
Cache the Schema or pre-compile. Then reuse the pre-compiled schema for validation. This will offer significant performance enhancements. Otherwise the parser has to load the schema each time, parse them, build the infoset, and then validate against the instance. caching, keeps the infoset version in memory and then it just needs to do the validation instead of all of the other steps.
If doing Data Binding, then depending on platform here are some recommendations:
Use XSDObjectGen instead of XSD.EXE, as it has better XML Schema support. *JAVA *If using JAXB then use JAXB 2.0 if possible. It has much improved XML Schema Support * JAXME 2 is an Apache implementation of the JAXB specification and runs with a Java 1.4 SDK or greater. *XMLBeans from Apache is another good alternative and has very good XML Schema support.
Regardless of which Data Binding tool chosen, it is recommended that validation against the XML Schema be undertaken. Data Binding tools still may produce invalid XML Instances, even though the classes were generated from the schemas.
5.2 How do I precompile or cache a schema using Xerces?
You need to be using a version of Xerces 2 that supports grammar pools. This feature was introduced with Xerces 2.6. It is recommended to always use the most current version of Xerces, many installations ship with older versions that do not have the schema caching ability. Information about XML Grammar Pools can be found on the Apache.org website.
STAR also has some sample code that shows how to handle this for STAR BODs. Note this is only a sample and will need to be modified for your particular environment.
5.3 How do I precompile or cache a schema using Microsoft .NET framework?
MSDN contains an article on XML Performance Improvements which specifies an number of best practices for working with XML and the .NET framework. Included in there is the recommendation to cache the schemas and reuse them when performing validation.
5.4 How do I precompile or cache a schema using SAXON for JAVA?
The Controlling Schema Validation in Java page contains information that explains how to preload schemas and reuse them during validation.
5.5 How do I precompile or cache a schema using SAXON for .NET?
SAXON supports an API for loading and validating schema when using .NET. This is documented in the Dot Net API and is implemented through the SchemaManager API.
5.6 How do I precompile or cache a schema using JAXP 1.3?
The article, "jaxp: Fast and Easy XML Processing" contains information on how to precompile and reuse the compiled schema with any parser.
6.0 Sample XML
6.1 It would be useful to see a sample of an XML file that would successfully validate against the STAR schema.
Question 1.) How can I obtain a copy of a valid sample XML file?
Answer: STAR offers a collection of sample XML files in the STAR schema repository. You may also generate your own sample XML from the STAR schema using a tool such as XML Spy. If you are using XML Spy, open the STAR schema and following these steps:
Go to the DTD/Schema menu Select Generate Sample XML File... Select mandatory vs non-mandatory attribute and element generation and whether or not to fill with data Select OK
7.1 What are the recommended parser to use for validation?
Question 1.) What parsers do you recommend for validating STAR BODs?
Answer: STAR recommends the following:
Xerces 2.7 or greater XML Spy 2006 sp2 Microsoft MSXML and .NET XML 1.1 or greater Saxon-SA
7.2 Validation Errors with PHP 5?
Qustion 1.) I can't validate the XML against the schemas in PHP 5. How do I do this?
Answer: If you are using PHP 5, then make sure that your system has the most recent version of PHP 5 installed. Along with this the most current version of libxml2 must be installed as well. PHP 5 uses the libxml2 library available at XMLSoft.org. There are known XSD implementation issues with libxml2. Periodic updates to this library correct known issues with libxml2's XSD implementation and validation with schemas.
Question 2.) Are there any Alternatives to using libxml2?
Answer: If you are running on a windows system and have the .NET framework installed, you can try interfacing the .NET framework library through PHP and use it's validation framework. You might also want to implement a web service that your application could call to validate using another platforms XSD validator.
8.0 XML Schema Parser Messages
8.1 XML Spy Messages
Question 1.) I am attempting to open a STAR 5 BOD using XML Spy 2006 sp2 and I'm receiving a message asking if I want XML Spy to create prefixes for several OAGIS namespaces. If I select "No" the files open without issues. Is this an error? Should I be creating prefixes?
Answer: No, this is not an error and no, there is no need to create prefixes for the OAGIS namespaces. This is an option that is offered specifically by the XML Spy tool and is not necessary for opening and validating STAR BODs
9.0 Schema Formats
9.1 Developer versus Standalone?
Question 1.) When developing, which format of the STAR schema should I use: Developer or Standalone?
Answer: It is recommended to use the Developer when implementing more than one schema, and doing schema caching. If only a limited number of STAR BODs are being implemented, and ability to cache the schemas is not available, then implement the Standalone.
Question 2.) If I'm using a noun-specific WSDL, which format of the STAR schema should I use: Developer or Standalone?
Answer: If a noun-specific WSDL is being implemented the Developer BODs must be used. Otherwise, namespace conflicts for schema definitions will occur in the STAR namespace.
Note: Due to the structure change and increased namespaces of STAR 5, Standalones are no longer true Standalones. They will still have to import the OAGI namespaces and any other additional required namespaces.
10.0 STAR 4 to STAR 5
Question 1.) In STAR 4.0 I was able to capture the version of the BOD with a bodVersion attribute. How will I do that in STAR 5.0?
Answer: In STAR 5.0 this requirement is captured in the "versionID" attribute. This is an attribute of the root element of the BOD. The version of the schema repository as a whole is captured in the "releaseID" attribute that is also an attribute of the root element of the BOD.
10.2 Verb Usage
Question 1.) I noticed some attributes are missing that were previously on Verbs in STAR 4. Where do these appear in STAR 5?
Answer: The OAGIS 9 verbs have been redesigned from STAR 4, and are not backwards compatible in many cases. As an example, the show attribute on the GET verb has been removed. A GET should always send back a SHOW response. To indicate how to handle error conditions, for ConfirmBOD, use the ConfirmationCode in the Application/Sender component.
Question 2.) Where is ReturnCriteria in STAR 4?
Answer:OAGIS 9 catagorizes the Verbs into the following catagories:
* Action * Response * Request
For the verbs that fall into these categories the equivalent to ReturnCriteria is:
Question 3.) Are there sequence diagrams for the BODs and Verbs?
Answer: Yes. The diagrams can be found for each Noun on the XML Sequence Diagrams page.
10.3 Platform Implementation of STAR 5
Question 1.) I use the XML Schemas to create database table and column names, but my database can only support 30 characters for the names. STAR 5 has many names longer than 30 characters.
Answer: OAGIS 9 Naming and Design Rules removed the 30 character naming restriction as many core component names are longer than 30 characters. If you are using Oracle 9 or later, then you might need to upgrade to Oracle 10. If that is not an option, then an interface layer may need to be created to map the Schema names to the appropriate database table or column name.
STAR XML BOD Verb Usage
The following is a guide for how OAGI recommends that the verbs be used with their 9.0 repository. The STAR 5 draft repository will follow these recommendations. These guidelines are recommend for use in other STAR versions as well, but the repository may not support all verb combinations.
These guidelines are recommended by OAGI and what they have found to be the best practices when implementing BODs in production.
The STAR Noun/Verb Matrix identifies all of the Nouns defined by STAR and the OAGIS verbs that STAR has associated with each noun. NOTE: OAGIS verbs are typically used in a request and response scenario. Unless otherwise stated, these sequence diagrams apply to STAR 4 and the STAR 5 Draft repository.
The UML sequence diagrams depict common verb usage scenarios. OAGIS verbs are typically used in a request and response scenario. Unless otherwise stated, these sequence diagrams apply to STAR 4 and the STAR 5 Draft repository.
The existence of an international standard for automotive credit data that supports web services allowed Ford Motor Credit's GDI to provide a single, consistent inter- face across multiple markets. As GDI expands to additional dealer systems and markets, we have a proven, widely accepted message structure to offer our partners.
– Ford Motor Credit Company , Dearborn, Michigan
We have enjoyed having to develop once, and to customize as other members need enhancements. This has provided a good ROI on our Development team, and provides a much shorter timeline to complete applications.!
– PBS Financial Systems , Calgary, AB, Canada
RouteOne has benefited by having a set of professional data architects working to create a standard that we can use in our messaging transactions. Without that, RouteOne, and likely each of our partners, would have to duplicate those resources. The STAR organization has consistently worked very effectively with RouteOne as we continue to rapidly enhance our products to meet the evolving needs of our integrated providers.