yeah, I tried again. I set up everything up to step 9 above. see that all my instances are under my new classes with the new namespaces. Close the file Re-open the file.
Now I see all the file:/// - based namespaces in my class browser again, and all the instances are attached to those classes. any idea what's going on? On Oct 20, 2:02 pm, donundeen <[EMAIL PROTECTED]> wrote: > ok, I think I've made some progress here; watching > this:http://www.topbraidcomposer.com/videos/tutorials/xmap/XMap-TopBraid.wmv > > gave me some clues. > > What I did was: > 1. drag xml file into my project > 2. open xml file with tbc. > 3. added a namespace, marcxml :http://metmuseum.org/ontologies/marc/ > (arbitrarily picked) > 4. when through all my imported classes and properties, and changed > the > file:///MCNProject2/sargent.xml#marc: tohttp://metmuseum.org/ontologies/marc/ > NOTE: I tried changing 'file:///MSCProject3/sargent.xml ' to > 'marcxml:' , but that left the whole URI in < > 's. Had to use the > full name, then the prefix is what you'd see, without the < > 's , in > the views. > 5. Delete all instances of all of these xml-based classes. > (collection, record, etc) > 6. "save as" an owl file. This is now my xml ontology definition file. > 7. open the owl file > 8. Change the baseURI and Default Namespace > tohttp://metmusuem.org/ontologies/marc/ > 8. drag the original xml file into the imports of the new owl file. > 9. yay, all imported elements are matched up with the existing classes > with the new prefixes. > 10. Tried importing another file of same schema, to see that this new > file also references the new prefixes. > > Now, the only place I see the 'file:///' based URIs is for the actual > instances, which is ok. > > .... > > Well, it looks like I spoke too soon. > > I closed my .owl file, opened some other files, then closed them, then > reopened my owl file, and now all the file:/// - based types are back, > and nothing is merged with my original created types! > > what am I doing wrong here? > > On Oct 17, 3:21 pm, donundeen <[EMAIL PROTECTED]> wrote: > > > 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 tohttp://www.loc.gov/MARC21/slim/ > > I also set up the prefix: > > marc:http://www.loc.gov/MARC21/slim/inmy 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 forhttp://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 -~----------~----~----~----~------~----~------~--~---
