logo
Scope < Authoring XTM Topic Maps, Part I < < Home 

PrevUpnext

Scope

Scope specifies the extent of validity for a topic characteristic.

As we have seen in previous sections, a topic characteristic can be a base name, an occurrence or an association. The assignment of such a characteristic can be considered to be valid only within a certain scope. Considering that not everybody is interested in everything or is supposed to have access to all information, the topic map author should be aware that the information in the topic map could be viewed under different contexts. To indicate this context he has the option to scope either:

  • the baseName of a topic
  • an occurrence in a topic, or
  • an association

As an example of scoping a base name we could indicate a certain language the base name is written in. Let us assume the topic bond-uni should be covered in two languages, English and German:

<topic id="bond-uni">
  <baseName>
    <scope>
      <subjectIndicatorRef 
         xlink:href="http://www.topicmaps.org/xml/1.0/language.xtm#en"/>
    </scope>
    <baseNameString>Bond University</baseNameString>
  </baseName>
  <baseName>
    <scope>
      <subjectIndicatorRef
         xlink:href="http://www.topicmaps.org/xml/1.0/language.xtm#de"/>
    </scope>
    <baseNameString>Bond Universität</baseNameString>
  </baseName>
</topic>

A particular language, such as 'english' is referenced by http://www.topicmaps.org/xml/1.0/language.xtm#en where after the '#" a two letter language code indicates a particular language. See the [ standard] for other languages.

Another application for scoping a base name might be that a specific name is important just for a special clientel.

A topic may have multiple base names in the same scope or in multiple scopes. If you do not scope a baseName, the scope is so-called unconstrained and that name is always valid in any context.

In order to scope an occurrence we extend our example from the last section. We add another website to the topic bond-uni which is only relevant for US citizens wanting to enrol at Bond.

<topic id="bond-uni">
  <instanceOf><topicRef xlink:href="#university"/></instanceOf>
  <baseName>
    <baseNameString>Bond University</baseNameString>
  </baseName>
  <occurrence>
    <instanceOf><topicRef xlink:href="#webpage"/></instanceOf>
    <resourceRef xlink:href="http://www.bond.edu.au/"/>
  </occurrence>
  <occurrence>
    <scope><topicRef xlink:href="#us-citizen"/></scope>
    <instanceOf><topicRef xlink:href="#webpage"/></instanceOf>
    <resourceRef xlink:href="http://www.australearn.org/bond.htm"/>
  </occurrence>
</topic>

In this case we have one unconstrained occurrence which is always valid and one occurrence whose validity is constrained. As usual, we have to define any new topics:

<topic id ="us-citizen">
  <baseName>
    <baseNameString>US citizen</baseNameString>
  </baseName>
</topic>

The last example will demonstrate how to scope a whole association. The association IT staff meets every Friday in staff lounge is not relevant for everyone but only for the IT staff:

<association>
  <instanceOf><topicRef xlink:href="#informal-meeting"/></instanceOf>
  <scope><topicRef xlink:href="#it-staff"/></scope>
  <member>
    <roleSpec><topicRef xlink:href="#participant"/></roleSpec>
    <topicRef xlink:href="#it-staff"/>
  </member>
  <member>
    <roleSpec><topicRef xlink:href="#location"/></roleSpec>
    <topicRef xlink:href="#staff-lounge"/>
  </member>
  <member>
    <roleSpec><topicRef xlink:href="#time"/></roleSpec>
    < topicRef xlink:href="#every-friday"/>
  </member>
</association>

To complete our example we define now each new introduced topic, except location (which we already have defined earlier):

<topic id="it-staff">
  <baseName>
    <baseNameString>IT staff</baseNameString>
  </baseName>
</topic>

<topic id="participant">
  <baseName>
    <baseNameString>participant</baseNameString>
  </baseName>
</topic>

<topic id="staff-lounge">
  <baseName>
    <baseNameString>IT staff lounge</baseNameString>
  </baseName>
</topic>

<topic id="time">
  <baseName>
    <baseNameString>time</baseNameString>
  </baseName>
</topic>

<topic id="every-friday">
  <baseName>
    <baseNameString>every Friday</baseNameString>
  </baseName>
</topic>

Scopes can be used to reduce the amount of information presented to an user. The more a system knows about the users background (language, preferences, etc.), the more tailored the information can be. If the author considered this.


PrevUpnext