All XML retrieved from the Krames StayWell Web Services will conform to our XML Schema and can be validated against the schema to ensure a valid response was recieved.
Most of the XML elements you recieve are meta-data; information intended to aid in the organization and consumption of the content. This data is intended to be used as is, with a few cases where the XML could be transformed into a more presentable form as explained below. The body element, in most cases, will need to be transformed because we include some proprietary elements in our markup of the displayable content.
Lists of data
Most of the Web Service methods will return lists of elements that can be transformed into lists if links. These include the methods for searching the content, listing collections, etc. Please see the relevant sections in the Common Usage Scenarios for more information.
Displayable Content
When applicable, the XML will contain a body element that contains the main displayable portion of the content. A sample XML transform is availabe to convert our XHTML markup into standard HTML which can be used as the basis for your implimentation. Once transformed, the HTML can be placed within your site's layout. Our content is not intended to be used as a stand-alone web page, it is data to be included within your existing page structure.
If the IsValid attribute is false, then you should not transform the body element at all. These special documents contain javascript and are intended to be used as-is. They will not contain any of our proprietary elements. While the XML does conform to our XML schema, and is guaranteed to be well-formed XML, the markup within the body element does not conform to our normal body schema.
Namespaces
The methods listed in the "Older Document API" section will have one of two namespace definitions assigned to each element in the XML response:
- xmlns="http://ws.staywell.com" is the namespace that defines the Krames Staywell metadata.
- xmlns="http://ws.staywell.com/markup" is the namespace that further defines the Krames StayWell markup elements.
As part of our streamlining efforts, none of the methods listed in the "Content API" section use namespaces.