Hello there,
I'm learning xml schema, and I have a question that somewhat confuses me.
if I have a structure like the following:
person
profile
firstname
lastname
title
address
street
city
state
zip
in Marklogic, if I have element editor and author, and I want to
distinguish them in different namespace so when I do search by name, I
won't mix editor's name and author's name.
I can have two ways to design the schema:
1. when I design the schema, I would put editor into one schema with
one namespace, and put author into another schema with another
namespace. this way inside document editor and author are seperated by
namespace. This way can fit the marklogic search.
2. just by looking at the structure, I'm very easily to think about
putting profile and address into a common schema with namespace like
"common-ns". and then another schema for person, which will import the
the common schema to reuse the profile element and address element.
but the person schema usually will be in another namespace. I have
this thinking is because I do java a lot and this way seems to make
element reusable.
but the problem for this approach is: since editor and author are
all type of person, and person will import common schema, so all the
profiles for editor and author will be in same namespace, then in
marklogic I won't be able to distinguish them and cannot do search.
Maybe I mixed the schema design with Marklogic. I'm kind of new to
schema design, and to me both way seems to have their purpose.
I'm wondering in general when designing schema, do we make reusable
element in a common schema? if so, then what is best/common way for
using namespace in schema?
Or in this case, what is the common way to design the schema? Does the
common way schema design always fit Marklogic?
One idea pops up to me is: maybe Marklogic is for data manipulate, so
we have one schema for marklogic, and then another schema to be used
for public.
I hope to get some help on this topic, or maybe point me to some
articles that describe the common sense of schema design.
Thanks a lot,
Helen
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general