Troubleshooting

Handling Schema Mapping Problems

How do I handle problems mapping from one schema to another?

In mapping elements or attributes from one schema to another, not all components map cleanly to the new schema. This is often due to the fact that the target schema does not account for a critical element or attribute type. You have several options to solve this problem. One option is to modify the target schema. Unfortunately, this is rarely possible.

A second option is to employ the style sheet to insert a comment node into the result. The comment will contain a notation indicating the information does not conform to the target schema and could not be inserted directly into the results:

 <xsl:template match=”someElem”> <xsl:comment> ...

Get Special Edition Using XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.