LISTSERV mailing list manager LISTSERV 16.0

Help for PIG Archives


PIG Archives

PIG Archives


[email protected]


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

PIG Home

PIG Home

PIG  July 2005

PIG July 2005

Subject:

Re: namespaces and versions (fwd)

From:

"Ray Denenberg, Library of Congress" <[log in to unmask]>

Reply-To:

PREMIS Implementors Group Forum <[log in to unmask]>

Date:

Fri, 8 Jul 2005 13:47:53 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (252 lines)

I think maybe we're saying the same thing.  I got into this discussion late,
Rebecca was telling me that premis was tentatively considering using a
single namespace across versions (even major versions) and I told here I
thought it was a bad idea. Seems you do to.  Please see separately posted
message: (subj: versioning/namespacing/location).   --Ray


From: "Christopher Vicary" <[log in to unmask]>
> Off the top of my head, I'm not sure that versioning namespaces as
> described below (using mods) presents any *new* challenges. Let's say
> that namespaces are required. When a schema imports elements from other
> schemas, you must include the external namespace prefix for those
> elements in instance documents. Since the namespace identifiers and
> their prefixes are unique, there is no problem here in determining which
> element definition to use. Again, I mocked up a test for this situation
> using XMLSpy and there was no problem because the validating parser
> required that namespace prefixes be used.
>
> Let's say for the sake of argument that there is a way avoid using
> namespace qualification. In this situation I believe there would be a
> problem, there would be no way to tell which definition of the element
> should be used. The important thing to remember, however, is that this
> would always a problem, regardless of whether the referenced namespaces
> are related versions. So the situation described below in which we have
> 2 namespaces, mods1 and mods2, with like-named elements being referenced
> from each namespace is no different from having 2 unrelated namespaces,
> say foo and bar, that contain like-named elements that are referenced
> from a 3rd shema (eg. foo:title and bar:title). Semantically, they
> present the same problem. That's probably one of the reasons namespaces
> are used in the first place.
>
> Now the situation described below is actually different from what was
> proposed for PREMIS (and what is used by METS). Below, each namespace
> identifier is unique, http://www.loc.gov/mods1 and
> http://www.loc.gov/mods2, and so are the schema locations. What we were
> proposing for PREMIS is to maintain the same namespace identifer, but
> version the schema locations. The possibility for confusion here seems
> greater, but I covered why I think even that situation is not a problem
> in my previous email.
>
> Again, I want to reiterate that the tests I created to prove the
> concepts were run using only XMLSpy which is my XML editor du jour (hey
> it's free and seems to work well). I have noticed cases where XMLSpy
> handles namespaces differently than say Xerces, but if anything XMLSpy
> seems to fall on the strict side of things. If I have some time, I may
> try out some other parsing tools.
>
> It might be nice to get another opinion on this topic, Jerry are you out
> there?
>
> -Chris
>
>
> Ray Denenberg, Library of Congress wrote:
>
> >The scenario I had in mind is represented by this sample schema:
> >
>
>...........................................................................
.
> >...............
> ><xsd:schema
> >
> >xmlns:mods1=http://www.loc.gov/mods1
> >xmlns:mods2="http://www.loc.gov/mods2"   ......>
> >
> ><xsd:import namespace="http://www.loc.gov/mods1"
> >schemaLocation="mods1.xsd"/>
> ><xsd:import namespace="http://www.loc.gov/mods2"
> >schemaLocation="mods2.xsd"/>
> >
> ><xsd:element name="root">
> ><xsd:complexType>
> ><xsd:sequence>
> ><xsd:element ref="mods1:titleInfo"/>
> ><xsd:element ref="mods2:titleInfo"/>
> ><xsd:element name="otherElement1"/>
> ><xsd:element name="otherElement2"/>
> ><xsd:element name="otherElement3"/>
> ><xsd:element name="etc"/>
> ></xsd:sequence>
> ></xsd:complexType>
> ></xsd:element>
> >
> ></xsd:schema>
> >.........................................................
> >
> >In this case someone has constructed a (hypothetical) schema that mixes
> >elements from two mods versions (along with other elements),
specifically,
> >titleInfo, where (hypothetically) the titleInfo definition has changed
from
> >(hypothetical) version 1 to (hypothetical) version 2.
> >
> >Does this help?
> >
> >--Ray
> >
> >
> >
> >
> >
> >
> >>---------- Forwarded message ----------
> >>Date: Wed, 29 Jun 2005 18:50:03 -0400
> >>From: Christopher Vicary <[log in to unmask]>
> >>Reply-To: PREMIS Implementors Group Forum <[log in to unmask]>
> >>To: [log in to unmask]
> >>Subject: Re: [PIG] namespaces and versions
> >>
> >>Sorry it's taken me so long to respond to this. I want to be sure I
> >>understand the scenario Ray is setting up. From what I gather from the
> >>final paragraph, there is a concern that a single schema may reference
> >>another namespace more than once with different schema locations
> >>attached to each reference. If we use METS as an example, there might be
> >>a namespace declaration in a schema's root element that takes the form:
> >>
> >>xmlns:METS="http://www.loc.gov/METS/"
> >>
> >>and a corresponding location:
> >>
> >>xsi:schemaLocation="http://www.loc.gov/METS/
> >>http://www.loc.gov/standards/mets/mets.xsd"
> >>
> >>Later in the same schema there might be a conflicting reference to the
> >>same namespace in an import statement:
> >>
> >><xs:import namespace="http://www.loc.gov/METS/"
> >>schemaLocation="http://www.loc.gov/standards/mets/version13/mets.xsd"/>
> >>
> >>Notice that while the namespace identifiers are the same, the locations
> >>are not.
> >>
> >>I wasn't sure exactly how a validating parser would handle this, so I
> >>created a test document and validated it using XMLSpy. It looks like the
> >>XMLSchema designers (or perhaps XML parser developers) have already
> >>considered this situation, because the referencing schema was invalid.
> >>The validator recognized that there are conflicting definitions within
> >>the same namespace. It appears as though we don't have to worry about
> >>this specific situation.
> >>
> >>I took it a step further and created a schema (test1.xsd) that
> >>references the METS namespace at the location
> >>http://www.loc.gov/standards/mets/mets.xsd. It also references another
> >>schema, test2.xsd. test2.xsd also references the METS namespace, but at
> >>the location http://www.loc.gov/standards/mets/version13/mets.xsd. In
> >>this hierarchical scenario, test1.xsd is invalid, again due to the
> >>definition conflict. test2.xsd, which only sees one reference to the
> >>METS namespace, is valid. To me, this does not seem to be problematic.
> >>
> >>I admit that I may not completely understand the situation outlined by
> >>Ray, if so, can someone provide a concrete example of the problem?
> >>Another caveat, I only had time to test this using one tool, XMLSpy,
> >>other validating parsers may treat this situation differently.
> >>
> >>Chris Vicary
> >>
> >>
> >>Ray Denenberg, Library of Congress wrote:
> >>
> >>
> >>
> >>>I just got subscribed to this list so pardon me if I'm out of context.
> >>>
> >>>Different schemas need different namespaces unless you can guarantee
that
> >>>any name occuring in both schemas will have a common definition. Thus
if
> >>>
> >>>
> >you
> >
> >
> >>>move from one version to another, take MODS for example, and you change
> >>>
> >>>
> >the
> >
> >
> >>>definition of, say, titleInfo, then if you want to maintain the same
> >>>namespace, you need to change the name of element titleInfo.
> >>>
> >>>I can't recall the exact example but in one of the MODS revisions we
> >>>concluded that it was much more disruptive to change the element names
> >>>
> >>>
> >(e.g.
> >
> >
> >>>titleInfo --> newTitleInfo) than to change the namespace.
> >>>
> >>>A generic namespace with different locations doesn't get around this.
You
> >>>cannot guarantee that sometime in the future some third schema won't
> >>>reference names from two different schemas with the same namespace.
When
> >>>that happens, if the reference an element that has different
definitions
> >>>
> >>>
> >in
> >
> >
> >>>the two schemas, you'd be in trouble.
> >>>
> >>>--Ray
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--
>
>>-------------------------------------------------------------------------
> >>Christopher Vicary: (352)392-9020 ext. 323
> >>e-mail: [log in to unmask]
> >>fax:    (352)392-9185
>
>>-------------------------------------------------------------------------
> >>    _/_/_/_/    _/_/_/  _/          _/_/
> >>   _/        _/        _/        _/    _/
> >>  _/_/_/    _/        _/        _/_/_/_/   F C L A
> >> _/        _/        _/        _/    _/    5830 NW 39th Avenue
> >>_/          _/_/_/  _/_/_/_/  _/    _/     Gainesville, Fl 32606
>
>>-------------------------------------------------------------------------
> >>F l o r i d a   C e n t e r   f o r   L i b r a r y   A u t o m a t i o
n
>
>>-------------------------------------------------------------------------
> >>
> >>
> >>
> >
> >
> >
>
> --
> -------------------------------------------------------------------------
> Christopher Vicary: (352)392-9020 ext. 323
> e-mail: [log in to unmask]
> fax:    (352)392-9185
> -------------------------------------------------------------------------
>     _/_/_/_/    _/_/_/  _/          _/_/
>    _/        _/        _/        _/    _/
>   _/_/_/    _/        _/        _/_/_/_/   F C L A
>  _/        _/        _/        _/    _/    5830 NW 39th Avenue
> _/          _/_/_/  _/_/_/_/  _/    _/     Gainesville, Fl 32606
> -------------------------------------------------------------------------
> F l o r i d a   C e n t e r   f o r   L i b r a r y   A u t o m a t i o n
> -------------------------------------------------------------------------

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

February 2024
January 2024
December 2023
August 2023
July 2023
June 2023
March 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
May 2022
April 2022
January 2022
December 2021
October 2021
August 2021
July 2021
June 2021
April 2021
March 2021
January 2021
December 2020
September 2020
August 2020
July 2020
June 2020
April 2020
February 2020
December 2019
November 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005

ATOM RSS1 RSS2



LISTSERV.LOC.GOV

CataList Email List Search Powered by the LISTSERV Email List Manager