An idref is used in a Document Type Definition(DTD) or XML Schema Definition(XSD) to bind the ID attribute value of a specified element to a separate attribute of one or more unrelated elements.
Questions tagged [idref]
36 questions
6
votes
1 answer
XML IDREF another XML document?
Is there an easy way to use the IDREF attribute to reference an element in a different XML document? If not, any suggestions on how to do it differently? What I'm trying to do is make a digital character sheet for a table-top RPG, and I want the XML…

WingManEXE
- 167
- 4
5
votes
2 answers
Which Java XML binding framework supports circular/cyclic dependencies?
I've got two classes:
public class A {
B refToB;
}
public class B {
A refToA;
}
they don't have unique id fields (which are required for JAX-B XMLID and XMLIDREF).
Object instances:
A a = new A();
B b = new B();
a.refToB = b;
b.refToA = a;
I…

m_vitaly
- 11,856
- 5
- 47
- 63
4
votes
0 answers
Potential bug in lxml(etree.XMLSchema) : doesn't verify IDREF relationships in xml document
I am using the lxml XMLSchema object to validate an xml file against my xsd which specifies xs:ID and xs:IDREF constraints. However, lxml apparently validates xml document to true even if there is no corresponding ID for the IDREF.
Any ideas on how…

Mindstorm
- 443
- 1
- 5
- 12
4
votes
1 answer
Is XML Schema's xs:ID type valid for an XML element, or only for attribuutes?
In the W3C Reco (here), I find that
[...] ID is a type of attribute and so it cannot be applied to attributes, elements or their content
As I can find some in the file I must deal with, I wonder if xsi:ID is really a valid xlm element type
My…

berlico
- 83
- 7
3
votes
1 answer
Usage of ID/IDREFS in XML Schema
how should I use ID/IDREFS within XMLSchema in order to use it for XSL transformation with xsl:key and xpath functions key() and id() ?
If I use the following DTD all is fine

Dominik
- 1,332
- 1
- 15
- 28
3
votes
1 answer
What is the typical maximum length of values of the XML/XSD ID/IDREF types?
The W3C XSD 1.0 Part 2: Datatypes specification refers to the W3C XML 1.0 specification for the definition of the ID and IDREF types, but none of these documents defines any constraints on the length of values of these types.
However, it seems that…

Andreas Maier
- 2,724
- 1
- 26
- 30
2
votes
2 answers
How to resolve an xml element using idref
Given some sample data.xml file:
Google
…

Decent Dabbler
- 22,532
- 8
- 74
- 106
2
votes
1 answer
Two xsd:id and xsd:idref - XSL:SCHEMA
i need to do a schema with one tag (A) with one attribute (A-Attr), another tag (B) with another attribute (B-Attr) and a third tag (C) with two attributes (A-Attr and B-Attr).
I don't know what i'm doing wrong. I think it might be related with id…

LeyCusack
- 21
- 1
- 2
2
votes
1 answer
Multiple IDs - Multiple IDREF - is it possible to assign specific IDREF to speficic ID in DTD?
the whole question is in the title: is it possible to assign specific IDREF to a specific ID in DTD?
I'm pretty sure it's not possible, but I just want to confirm it here :P
E.g. I have a client and worker elements with attributes of type ID, and…

bochen421
- 161
- 3
- 14
2
votes
1 answer
Id and idref attributes in XSD
I'm working on an assignment of putting together XML documentation for an event calendar, which consists of event elements that have child elements of name, date, venue, etc. Several events have the same venue but the contact info for each venue is…

Maria Niku
- 51
- 1
- 4
2
votes
0 answers
HyperJAXB and ID/IDREF
Has there been any update on using IDs and IDREFs for JAXB 2.x in HyperJAXB3?
HyperJAXB and IDREFs
I've added a baseType binding to my IDREF element and the correct type is generated on the owner object, but the resulting class does not compile, as…

apoplexy
- 323
- 2
- 9
2
votes
1 answer
How can I reference XML ids from another XML using XInclude in a way that Webstorm does not mark it as an error?
I have the following XML files:
main file
…

gztomas
- 3,030
- 3
- 27
- 38
1
vote
1 answer
Trying to simulate the XQuery function fn:idref() but without a schema
I want to search an XML document for the element that has an idrefs attribute containing a specific id. For example, given this XML document doc.xml;

Nigel Alderton
- 2,265
- 2
- 24
- 55
1
vote
1 answer
How to use the XQuery fn:idref() function?
I can't get the XQuery function fn:idref() to return anything.
I have this XML document doc.xml;
And this XQuery;
let $d := doc("doc.xml")
return $d/idref("xyz")
But the result is always…

Nigel Alderton
- 2,265
- 2
- 24
- 55
1
vote
1 answer
Circular reference in JSON call bring id and ref thus undefined values to the option list
I have an optionlist that is bringing undefined values in dropdown along with few values. In response data only few values are coming with ID rest are REF(undefined). The entity it's linked to has a column ID and another column which is self join to…

MadMax
- 11
- 1