Oh, I found it in SF_FormClasses.inc:287 in createFromDefinition

On Wed, Jan 28, 2009 at 3:38 PM, Brian <Brian.Mingus@colorado.edu> wrote:
I've tried to read the code - unfortunately it appears that it ought to work based on the comments. For example

SF_FormClass.inc:140
                        // finally, get any non-semantic fields defined
SF_FormPrinter.inc:264
         $all_fields = $tif->getAllFields();

I haven't found the part where the unknown fields get thrown out


On Wed, Jan 28, 2009 at 3:32 PM, Yaron Koren <yaron57@gmail.com> wrote:
Oh, yes - I actually meant to make this change a while ago, but I haven't done it yet.

-Yaron

On Wed, Jan 28, 2009 at 4:50 PM, Brian <Brian.Mingus@colorado.edu> wrote:
The BibTeX standard specifies that any extra fields that are not explicitly part of the standard will simply be ignored by BibTeX. This means that bibliographies that have been created over the last several decades contain a slew of non-standard fields since they are allowed by the standard. You would be truly shocked to see kinds of key=value pairs people have in their bibliographies.

There were three approaches I could take to this (I chose #3)

1) Throw the extra fields away (very unfriendly and backwards incompatible!)
2) Create new properties for every single unknown property I encountered, then modify the associated Template and Form accordingly. I could mark each of the hundreds of properties in the wiki that are not part of the bibtex standard as "hidden" in the Semantic Form.
3) Simply convert the entire bibtex entry, including unknown properties, to my template. MediaWiki ignores the extras.

I chose 3 because it provides full backwards compatibility - the file they export contains at least as much data as the file they imported.

For example, here is some bibtex that might be imported:

@JOUR{Hawking72,
author="Stephen Hawking",
title="Black hole explosions",
blah="blerg",
date="1/29/1972"
}

Through some very trivial string manipulations I convert that to a wiki template:

{{Paper
|author=Stephen Hawking
|title=Black hole explosions
|blah=blerg
|date=1/29/1972
}}

MediaWiki simply ignores blah=blerg. But suppose the user uses 'edit with form'. Data is lost:

{{Paper
|author=Stephen Hawking
|title=Black hole explosions
|date=1/29/1972
}}

It doesn't seem like a feasible solution to add the "blah" semantic property and make it "hidden" - I don't care about it, I just want to be user friendly.

Thoughts?

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-user