SMW users,

I found the fix, it was to unset $smwgNamespaceIndex, I had set it to 100.

SMW was using its standard namespaces, 100 to 105 I think. My custom namespaces are above that, 120 to 123.

Thanks again,

Brian O.

On May 5, 2008, at 11:43 AM, Brian Osborne wrote:

SMW users,

First, to the developers, congratulations, this is some wonderful software. 

I have a question about getting SMW to work with custom namespaces. I have a little test Wine wiki, it has custom namespaces (from LocalSettings):

$wgExtraNamespaces[120] = "Wine";
$wgExtraNamespaces[121] = "WineRegion";
$wgExtraNamespaces[122] = "WineReview";
$wgExtraNamespaces[123] = "Grape";

I've modified SMW_Setttings to make sure that these namespaces are used:

$smwgNamespacesWithSemanticLinks = array(
                 NS_MAIN => true,
                 NS_TALK => false,
                 NS_USER => true,
            NS_USER_TALK => false,
              NS_PROJECT => true,
         NS_PROJECT_TALK => false,
                NS_IMAGE => true,
           NS_IMAGE_TALK => false,
            NS_MEDIAWIKI => false,
       NS_MEDIAWIKI_TALK => false,
             NS_TEMPLATE => false,
        NS_TEMPLATE_TALK => false,
                 NS_HELP => true,
            NS_HELP_TALK => false,
             NS_CATEGORY => true,
        NS_CATEGORY_TALK => false,
        SMW_NS_PROPERTY  => true,
   SMW_NS_PROPERTY_TALK  => false,
             SMW_NS_TYPE => true,
        SMW_NS_TYPE_TALK => false,
                     120 => true,
                     121 => true,
                     122 => true,
                     123 => true

I also refreshed the data:

apache-2.2.8/htdocs/mediawiki/maintenance>php SMW_refreshData.php 
Refreshing all semantic data in the database!
Processing pages from ID 0 to ID 1278 ...
91 pages refreshed.

However, the semantics don't work, I don't see output from the ask# statements, for example. I should add that when I simply create pages for grapes and wines without custom namespaces then I see all the semantics, facts, and ask# output, very nice.

Your thoughts? Details on the Wiki are below.

Thanks again,

Brian O.


Special pages
Semantic Forms (version 1.1.1)Forms for adding and editing semantic dataYaron Koren and others
SpecialInterwiki (version 14-12-07)Adds a special page to view and edit the interwiki tableStephanie Amanda Stevens, SPQRobin and others
Parser hooks
Semantic MediaWiki (version 1.0.1)Making your wiki more accessible – for machines and humans. View online documentation.Klaus Lassleben, Markus KrötzschDenny Vrandecic, S Page, and others. Maintained by AIFB Karlsruhe.
Extension functions
wftestFormExtension, wfSetupFunctions, wfGFlashExtension, Interwiki, wfExampleParserFunction_Setup, smwfSetupExtension, sfgSetupExtension and sfgParserFunctions

This email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.;198757673;13503038;p?
Semediawiki-user mailing list