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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...