[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: is an xml:id attribute a "DTD-determined ID"?

  • From: Mike Sokolov <sokolov@ifactory.com>
  • To: Michael Glavassevich <mrglavas@ca.ibm.com>
  • Date: Wed, 16 Sep 2009 18:17:47 -0400

Re:  is an xml:id attribute a "DTD-determined ID"?
FYI - I did finally get my case working, using the DTD; I had some 
internal confirguration issue preventing validation from being turned on 
properly.  I can confirm that xproc element() references to xml:ids do 
work with xerces when the DTD declares them to be of type ID.

Thanks to all who replied.

-Mike

Mike Sokolov wrote:
> OK thanks; so just to recap: although Xerces is not an xml:id 
> processor, it should be possible to identify an occurrence of xml:id 
> as an ID by declaring it so in a DTD, and I guess, validating a 
> document against that DTD, thereby enabling the xpointer element() 
> resolution.
>
> In my case, the DTD relating to this content, which is based on TEI, 
> does seem to have a declaration for xml:id:
>
> <!ENTITY % att.global.attribute.xmlid '
> xml:id ID #IMPLIED'>
>
> which is attached to most or all of the elements, so presumably if I 
> enable the parser's validation, this should attach ID nature to the 
> attributes in question.
>
> I'll dig deeper and see if I can figure out why that's not happening...
>
> Thanks again
>
> -Mike
>
> ...
>
> Michael Glavassevich wrote:
>>
>> If you read through the specification you'll notice that the 
>> assignment of IDs is conceptually done by a component separate from 
>> the parser called an xml:id processor [1]. Xerces has never provided 
>> an implementation of such a processor, so the answer to your question 
>> is no it won't work unless you've declared xml:id in a DTD. This 
>> isn't a bug. It's just a spec we've never implemented and have never 
>> claimed to support.
>>
>> [1] http://www.w3.org/TR/xml-id/#dt-xml-id-proc
>> "An xml:id processor is a software module that works in conjunction 
>> with an XML processor (i.e. parser) to provide access to the IDs in 
>> an XML document."
>>
>> Michael Glavassevich
>> XML Parser Development
>> IBM Toronto Lab
>> E-mail: mrglavas@ca.ibm.com
>> E-mail: mrglavas@apache.org
>>
>> Mike Sokolov <sokolov@ifactory.com> wrote on 09/16/2009 02:50:16 PM:
>>
>> > Yes - I was hoping you would pick up this thread. So, I'm not sure I
>> > understood your response.  I guess my basic question is whether it is
>> > feasible to use xpointer="element(<id-value>)" with Xerces (as it 
>> seems
>> > from the FAQ), and if so, what needs to be in place for that to 
>> work.  I
>> > understand the ids needs to be recognized as such, but I'm a little
>> > unclear on how to make that happen.
>> >
>> > I did think (naively, perhaps), that xml:id was just automatically
>> > recognized as having type "ID" by virtue of its special nature.
>> >
>> > Then I thought perhaps it is necessary to validate (with a DTD) in 
>> order
>> > to get that fact identified (I think this seems to be what you're
>> > saying), so I enabled validation.  But my xpointer references are 
>> still
>> > failing.  If you can confirm that this *should* work, then I will 
>> assume
>> > the parser isn't actually validating as I thought.
>> >
>> > -Mike
>> >
>> > Michael Glavassevich wrote:
>> > >
>> > > john.l.clark@gmail.com wrote on 09/16/2009 02:20:49 PM:
>> > >
>> > > > Mike,
>> > > >
>> > > > On Wed, Sep 16, 2009 at 2:04 PM, Mike Sokolov 
>> <sokolov@ifactory.com>
>> > > wrote:
>> > > > > Question: is xml:id considered a "DTD-determined ID" 
>> according to
>> > > the XProc
>> > > > > spec?  I read it, and found this sentence:
>> > > > >
>> > > > > [Definition: An attribute information item is a 
>> DTD-determined ID
>> > > if and
>> > > > > only if it has a [type definition] property whose value is equal
>> > > to ID.]
>> > > > >
>> > > > > I think that's true of xml:id, but would like it if someone more
>> > > > > knowledgeable could confirm or deny
>> > > >
>> > > > It sure is.  See <http://www.w3.org/TR/xml-id/#dt-id-assignment>,
>> > > > which I think is pretty clear on that.
>> > >
>> > > ... only if an xml:id processor did that assignment. The attribute
>> > > itself doesn't magically have that property.
>> > >
>> > > > Take care,
>> > > >
>> > > >     John L. Clark
>> > > >
>> > > > 
>> _______________________________________________________________________
>> > > >
>> > > > XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>> > > > to support XML implementation and development. To minimize
>> > > > spam in the archives, you must subscribe before posting.
>> > > >
>> > > > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>> > > > Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>> > > > subscribe: xml-dev-subscribe@lists.xml.org
>> > > > List archive: http://lists.xml.org/archives/xml-dev/
>> > > > List Guidelines: 
>> http://www.oasis-open.org/maillists/guidelines.php
>> > >
>> > > Michael Glavassevich
>> > > XML Parser Development
>> > > IBM Toronto Lab
>> > > E-mail: mrglavas@ca.ibm.com
>> > > E-mail: mrglavas@apache.org
>>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.