I've read these instructions a dozen times, and I still can't get my
xml file to load with anything other than the filename as the prefix.

here's what the top of the xml file looks like:
<?xml version="1.0" encoding="UTF-8" ?>
<marc:collection
    xmlns="http://www.loc.gov/MARC21/slim/";
    xmlns:marc="http://www.loc.gov/MARC21/slim/";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    targetNamespace="http://www.loc.gov/MARC21/slim/";>
    <marc:record>
        <marc:leader>00259nz a2200109n 4500</marc:leader>
[etc]

I put the file in my project, then open the overview for the file.
I leave the name BaseURI alone, decouple it from the Default
Namespace, then set the Default Namespace to
http://www.loc.gov/MARC21/slim/
I also set up the prefix:
marc:http://www.loc.gov/MARC21/slim/ in my main file prefix
definitions.

Then I drag the file from my project, into my main file's imports.
But in my class browser, my types still look like
file:///MCNProject3/sargent.xml#marc:record

What I really want is just to see
marc:record, where marc is the prefix for http://www.loc.gov/MARC21/slim/

This is a bit of a conflation of marc: the prefix for the xml format,
and marc as a prefix for the rdf-translated types, and maybe I
shouldn't do that, but it seems I'm far form that issue, as I can't
get the types to import with anything other than the filename as the
prefix.

my real goal here is that I get rid of those annoying "file:///" type
prefixes, to have all http:// prefixes that I've specified myself,
rather than any prefixes or namespaces generated by the system (like
these ones based on the filename)

can you help me through this process?

thanks again!


On Oct 14, 12:19 pm, Scott Henninger <[EMAIL PROTECTED]>
wrote:
> Don;  The base URI and default namespace are used for different
> purposes.  The base URI identifies the file and the default namespace
> is used for any resource in the file that does not have a prefix
> associated with it.  When you want resources in two files to point to
> the same namespace, these aren't the places to do that as they are
> associated with the file.
>
> To get what you want there are a couple of options.  The first is not
> to use namespace prefixes.  Remove the Default Namespace in your
> imported files and use the same URI for your resources - e.g.
> file:///testMarc/sargent.xml#code-marcsubfield.  When imported the
> full URI will be the same and the resources will be interpreted as
> being the same.
>
> A second option is to create prefixes in your imported files.  In each
> file remove the default namespace and Add... a prefix.  The prefix can
> be different, say p1 in one file and p2 in the other, but if the
> Namespace URI associated with the prefix is the same then resources
> with the same name will have the same URI.  E.g. if the prefix
> definition for file1 is:
>   prefix p1 is file:///testMarc/sargent.xml#, and for file2
>   prefix p2 is file:///testMarc/sargent.xml#
>
> then when imported to another file p1:code-marcsubfield and p2:code-
> marcsubfield would expand to the same resource, 
> file:///testMarc/sargent.xml#code-marcsubfield
>
> -- Scott
>
> On Oct 14, 10:07 am, donundeen <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I'm trying to import several xml files of the same format into one TBC
> > ontology.
>
> > let's say I have two xml files to import:
> > file:///testMarc/sargent1.xml
> > and
> > file:///testMarc/sargent2.xml
>
> > When I import these two files, the namespace on all the elements is
> > the filename, ie, a property imported from the first file looks like:
> > file:///testMarc/sargent1.xml#code-marcsubfield
> > and from the second looks like:
> > file:///testMarc/sargent2.xml#code-marcsubfield
>
> > When what I want is for them to be the same namespace, so I can assign
> > it a prefix in the importing file.
>
> > I tried playing with the Base URI and Default Namespace in the xml
> > file overview, to no avail.
>
> > How do I accomplish what I'm trying to do?
>
> > thanks!
>
> > don
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to