Jump to content

Importing specific elements in schemas (with xlink?)


Guest All_P

Recommended Posts

Guest All_P

Hi everybody,the following question is about importing elements from one schema to another.Consider the following situation with 2 schemas.One schema creates an entire set of elements.The second schema needs to import specific elements.(The goal is that the second schema does not import every element ofthe first schema.)I have a solution for this but I'm not entirely satisfied with the methods i used and I was wondering if this could be done with Xlink. I can only find examples of xlink with instance documents, where they use locators to extract elements fromother sources. But i do not know how to create a locator in a schema.My question therefore is:can this be done and if so, can someone post a simple example.TnxAll p

Link to comment
Share on other sites

One way I would prefer is XInclude. It has xpointer attribute which lets you include only a portion of the selected document.This article (originally written for another purpose) shows what I have in mind.XInclude's namespace URI is http://www.w3.org/2001/XInclude. However, note that the schema validator needs to support XInclude as well. If not, another XInclude processor must do the inclusions before the validation is to begin.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...