[kepler-dev] From <kar> to <kar:kar>

ben leinfelder leinfelder at nceas.ucsb.edu
Wed Apr 14 18:24:08 PDT 2010


Jing,
If we have a namespace, does Metacat try to find the schema so that it  
can also validate it when the XML is uploaded?
I know for MOMLs it was grabbing the DTD from a berkley server and  
doing some validation based on that.
If we go though the trouble of validating to a schema (with an  
established namespace) we should probably have the schema available  
online for other tools to use for their own validation needs (like  
Metacat).

Also, how much hardcoding of the namespace prefix was needed (like in  
component search)? In theory you should be able to use any prefix you  
want (kar:kar, bensKar:kar,  
thisCrazyLongPrefixThatNoOneWouldEverUseInRealLife:kar) and as long as  
it mapped to the correct full namespace you'd be fine. I know in  
practice this can be difficult to do (especially when authoring XML  
with plain old strings).

Thanks,
-ben

On Apr 14, 2010, at 4:32 PM, Jing Tao wrote:

> This is a good idea. Since our kar schema used http://www.kepler-project.org/kar 
> , I just adopted it.
>
> I have changed the schema to 2.0.0 on both trunk and 2 branch.
>
> Thanks,
>
> Jing
>
> Jing Tao
> National Center for Ecological
> Analysis and Synthesis (NCEAS)
> 735 State St. Suite 204
> Santa Barbara, CA 93101
>
> On Wed, 14 Apr 2010, Matt Jones wrote:
>
>> The namespace should include a version identifier so that we can
>> differentiate the schemas as the kar format evolves over time.  So  
>> I suggest
>> the namespace be:
>>
>> http://www.kepler-project.org/kar-2.0.0
>>
>> (Let's reserve the 1.0.0 namespace for the old versions of kars  
>> that shipped
>> with Kepler 1.0.0).
>>
>> Matt
>>
>> On Wed, Apr 14, 2010 at 3:00 PM, Jing Tao <tao at nceas.ucsb.edu> wrote:
>>
>>> hi, devs:
>>>
>>> I just got a task today - enable the kar xml validation during the  
>>> remote
>>> component search.
>>>
>>> I palyed around and found that we should put namespace definition  
>>> on kar
>>> xml instance in order to enable the validation.
>>>
>>> Currently, the kar xml generated by kepler looks like:
>>> <kar>
>>> <karFileName> </karFileName>
>>> <karFileSize> </karFileSize>
>>> <mainAttributes> </mainAttributes>
>>> <karEntry> </karEntry>
>>> </kar>
>>>
>>> I propose to change to:
>>>
>>> <kar:kar xmlns:kar="http://www.kepler-project.org/kar">
>>> <karFileName> </karFileName>
>>> <karFileSize> </karFileSize>
>>> <mainAttributes> </mainAttributes>
>>> <karEntry> </karEntry>
>>> </kar:kar>
>>>
>>> After making above change and twist some other java code, the  
>>> component
>>> search with kar xml validation works.
>>>
>>> I am not sure if the change from <kar> to <kar:kar> will cause any  
>>> other
>>> break in kepler. Just want to double check and let everyone know  
>>> my change.
>>> If you do see any issue, please let me know.
>>>
>>> Thanks,
>>>
>>> Jing
>>>
>>>
>>>
>>> Jing Tao
>>> National Center for Ecological
>>> Analysis and Synthesis (NCEAS)
>>> 735 State St. Suite 204
>>> Santa Barbara, CA 93101
>>> _______________________________________________
>>> Kepler-dev mailing list
>>> Kepler-dev at kepler-project.org
>>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>>>
>>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev



More information about the Kepler-dev mailing list