Colleen,
As I understand the W3C documentation on "xml:id Version 1.0"
http://www.w3.org/TR/xml-id/
an XML processor that supports xml:id is supposed to assign a data type
of ID to @xml:id whether or not there is any schema definition for the
XML document. The way that this gets reported to the application is
implementation dependent:
http://www.w3.org/TR/xml-id/#inform
So if xml:id support is implemented in ML Server, any xml:id attribute
will have an xs:ID type by the time fn:id() operates on the data. There
shouldn't be a compatibility issue with the May 2003 XQuery spec, I
don't think.
In the meantime, we'll look into loading an XML schema with the required
definitions,
thanks,
David S.
On Tue, 22 Aug 2006, Colleen Whitney wrote:
> Dear David:
>
> We have verified that our server supports the id() function as per the
> May 2003 spec. The catch is that in the May 2003 spec, fn:id() requires
> that the attribute in question be of type xs:ID. ("An element has an ID
> value of V if it has an attribute whose type is xs:ID and whose value is
> V, or if the element itself is of (simple) type xs:ID and has a value of
> V.") So in essence, what you are seeing is an issue with data typing,
> because the xml namespace does not have an attribute id of type xs:ID.
>
> Since you have confirmed that you are willing to reload your data, the
> cleanest way to handle this is to put id in a different namespace and
> write a schema that defines your id attribute as being of type xs:ID.
> This can be defined as follows:
>
> <xs:attribute name="myid" type="xs:ID"/>
>
> Regards,
>
> Colleen
>
>
> Colleen Whitney
>
> Consultant and Support Engineer
>
> Mark Logic Corporation
>
> 2000 Alameda de las Pulgas
>
> Suite 100
>
> San Mateo, California 94403
>
> +1 650 6552366 Phone
>
> +1 650 655 2310 Fax
>
> [EMAIL PROTECTED]
>
> www.marklogic.com
>
> This e-mail and any accompanying attachments are confidential. The
> information is intended solely for the use of the individual to whom it
> is addressed. Any review, disclosure, copying, distribution, or use of
> this e-mail communication by others is strictly prohibited. If you are
> not the intended recipient, please notify us immediately by returning
> this message to the sender and delete all copies. Thank you for your
> cooperation.
>
>
> -----Original Message-----
> From: David Sewell [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 18, 2006 1:34 PM
> To: General Mark Logic Developer Discussion
> Cc: Tim Finney; support
> Subject: Re: [MarkLogic Dev General] id() for @xml:id?
>
> On Thu, 17 Aug 2006, Tim Finney wrote:
>
> > The id() function looks up elements with a given ID value.
> > Unfortunately, all my IDs are in the XML namespace. At the moment I
> use
> > the following which does not seem too efficient:
> >
> > fn:doc($uri)//@xml:id[. = $id]/..
> >
> > Is there a way to use id() with @xml:ids? If not, is there a good way
> to
> > get a node with a particular @xml:id?
>
> Using Saxon8 for example, the query
>
> let $doc := document {
> <doc>
> <p xml:id="node1">one</p>
> <p xml:id="node2">two</p>
> </doc>
> }
> return $doc//id('node2')
>
> ==> <p xml:id="node2">two</p>
>
> With ML Server 3.1 it returns the empty sequence.
>
> Since xml:id has been a W3C recommendation for a year now, could support
> for it be added as an RFE in MarkLogic Server?
>
> David
>
>
--
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 400318, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: [EMAIL PROTECTED] Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general