$PH/genxml/XML_IDREF_googleSearch050908.txt - RJL 050908:2140 google XML IDREF yields about 267,000 references including: (top two:) [Warning: some googled HREFS to URLs fail and you may have to remove an imbedded space '=20' to make them work.-RJL] I looked up the following ones- and added comments on some. I also saved two interesting ones in $CASE/gen/genxml/doc (linked from $PH/COOL-GEN/genxml/doc) -------------- Extensible Markup Language (XML) 1.0 (Second Edition) Values of type IDREF must match the Name production, and values of type ... in the XML document; ie IDREF values must match the value of some ID attribute. ... www.w3.org/TR/2000/REC-xml-20001006 - 193k From www.w3.org/TR/2000/REC-xml-20001006: --------------------- 3.3.1 Attribute Types XML attribute types are of three kinds: a string type, a set of tokenized types, and enumerated types. The string type may take any literal string as a value; the tokenized types have varying lexical and semantic constraints. The validity constraints noted in the grammar are applied after the attribute value has been normalized as described in 3.3 Attribute-List Declarations. Attribute Types [54] AttType ::= StringType | TokenizedType | EnumeratedType [55] StringType ::= 'CDATA' [56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default] | 'IDREF' [VC: IDREF] | 'IDREFS' [VC: IDREF] | 'ENTITY' [VC: Entity Name] | 'ENTITIES' [VC: Entity Name] | 'NMTOKEN' [VC: Name Token] | 'NMTOKENS' [VC: Name Token] Validity constraint: ID Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them. Validity constraint: One ID per Element Type No element type may have more than one ID attribute specified. Validity constraint: ID Attribute Default An ID attribute must have a declared default of #IMPLIED or #REQUIRED. Validity constraint: IDREF Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute. Validity constraint: Entity Name Values of type ENTITY must match the Name production, values of type ENTITIES must match Names; each Name must match the name of an unparsed entity declared in the DTD. ----------------------- Section 3.3.9 IDREF [Definition:] IDREF represents the IDREF attribute type from [XML 1.0 (Second Edition)]. The ·value space· of IDREF is the set of all strings that ·match· the NCName production in [Namespaces in XML]. The ·lexical space· of IDREF is the set of strings that ·match· the NCName production in [Namespaces in XML]. The ·base type· of IDREF is NCName. For compatibility (see Terminology (§1.4)) this datatype should be used only on attributes. 3.3.9.1 Constraining facets IDREF has the following ·constraining facets·: length minLength maxLength pattern enumeration whiteSpace 3.3.9.2 Derived datatypes The following ·built-in· datatypes are ·derived· from IDREF: IDREFS --------------------- Section 3.3.10 IDREFS [Definition:] IDREFS represents the IDREFS attribute type from [XML 1.0 (Second Edition)]. The ·value space· of IDREFS is the set of finite, non-zero-length sequences of IDREFs. The ·lexical space· of IDREFS is the set of space-separated lists of tokens, of which each token is in the ·lexical space· of IDREF. The ·itemType· of IDREFS is IDREF. For compatibility (see Terminology (§1.4)) IDREFS should be used only on attributes. 3.3.10.1 Constraining facets IDREFS has the following ·constraining facets·: length minLength maxLength enumeration whiteSpace pattern ----------------------- From A Schema for Datatype Definitions (normative): --------------- XML Schema Part 2: Datatypes Second Edition [Definition:] IDREF represents the IDREF attribute type from [XML 1.0 (Second Edition)]. The ·value space· of IDREF is the set of all strings that ·match· ... www.w3.org/TR/xmlschema-2/ - 513k - Sep 7, 2005 - From www.w3.org/TR/xmlschema-2/ Section 1.1 Purpose: The [XML 1.0 (Second Edition)] specification defines limited facilities for applying datatypes to document content in that documents may contain or refer to DTDs that assign types to elements and attributes. However, document authors, including authors of traditional documents and those transporting data in XML, often require a higher degree of type checking to ensure robustness in document understanding and data interchange. The table below offers two typical examples of XML instances in which datatypes are implicit: the instance on the left represents a billing invoice, the instance on the right a memo or perhaps an email message in XML. ---------------------- ------------- xml-dev - Re: XML-LINK and IDREF Formally, my understanding of ID/IDREF is that it is part of XML-LANG and must ... Is the intention in XML that IDREF(S) attributes are only supported "for ... lists.xml.org/archives/xml-dev/199706/msg00007.html - 11k ---------------- XML editor - Intelligent XML Editing The attribute "linkend" is defined as IDREF (a reference to an ID value). ... XPath is a language for addressing specific parts of an XML document. ... www.oxygenxml.com/intelligent_xml_editing.html - 77k - Sep 8, 2005 From the above: (FOX contributors ofteen recommend doXygen for documentation) Intelligent XML Editing Context Sensitive Content Assistant offers the list of elements, attributes and attribute values through a content completion assistant. Unlike other editors that offer all the available entries, for example all the element names defined by the document XML Schema, shows only those entries valid in the editing context. In this way the XML document is kept valid most of the time and the user does not have to know about the relations between elements. Content Assistant for Documents without a Schema If there is a schema associated to the edited document then will analyze it and initialize the content assistant. In cases the document has no associated schema then the content completion is initialized by examining the edited document and by learning its structure. Another way is for one to specify in the options the default XML Schema or DTD to be used. Note that the learned structure can be saved to a DTD file and can be used as a skeleton for further development. Configurable Content Assistant Behaviour There are many settings that customize the operating mode of the content assistant. For example you can enable or disable the generation of the required content or modify the way the cursor is positioned after an insertion. Support for IDREFs will present the ID values collected in the last validate action on the content completion proposals where an IDREF or an IDREFS type is specified. This works not only with documents that have a DTD associated but also with documents that have an XML Schema or a Relax NG schema associated. In the following sample you can see the content completion list containing all the IDs displayed when creating a link. The attribute "linkend" is defined as IDREF (a reference to an ID value). The document has associated the DocBook DTD. ... XPath XPath is a language for addressing specific parts of an XML document. XPath, like the Document Object Model (DOM), models an XML document as a tree of nodes. An XPath expression is a mechanism for navigating through and selecting nodes from the XML document. The XPath control is conveniently located at the top right corner of the XML Editor and of Tree Editor. The results of an XPath query are shown as a list in the results panel. You can save the results to a file by clicking the Save Results option from the right-click menu or even print the XPath results. Clicking on a result line will highlight the corresponding part from the document. ... Folding XML documents have a tree structure. The folding allows you to collapse elements leaving in the focus only the ones you need to edit. An unique feature of is the fact that the folds are persistent: the next time you will open the document the folds are restored to the last state so you continue to work from where you left. For non XML files the folding strategy is to collapse blocks of text that have the same indent. In the next image you can see that only one of the chapter sections is expanded and the rest are collapsed. The folds show in the right side the number of lines that were collapsed. ... To make the fold operation faster you can use the contextual menu to collapse or expand all the child folds of an element. ------------------ ----------------- When is XSLT not appropriate? - XML As I don't reckon much to XML's IDREF for representing graph structures, I used RDF instead. To handle the "context switching", I used a good many variables ... www.thescripts.com/forum/thread84712.html - 38k [Not very informative-RJL] --------------- SoapIdref Constructor (String) (.NET Framework) <<<< Not public - RJL (.NET 247 later is readable - but not informative.-RJL) Initializes a new instance of the SoapIdref class with an XML IDREF attribute. ... Parameters. value: A String containing an XML IDREF attribute. ... msdn.microsoft.com/.../cpref/html/frlrfSystemRuntimeRemotingMetadataW3cXsd2001SoapIdrefClassctorTopic2.asp - 13k - Cached - Similar pages SoapIdref.Value Property (.NET Framework) <<<< Not public - RJL Gets or sets an XML IDREF attribute. ... Property Value. A String containing an XML IDREF attribute. Requirements. Platforms: Windows 98, Windows NT 4.0, ... msdn.microsoft.com/.../cpref/html/frlrfSystemRuntimeRemotingMetadataW3cXsd2001SoapIdrefClassValueTopic.asp - 13k ---------------- From page 2: : Class ElementDefinition The conditional attribute controls the expression of an XML element (or an XML idref attribute). ... The isIdRef indicates that the attribute is an idref. ... jxquick.sourceforge.net/javadoc/com/jxml/quick/model/qiml/ElementDefinition.html - 42k - Cached - Similar pages From the above: ---------- com.jxml.quick.model.qiml Class ElementDefinition java.lang.Object | +-com.jxml.quick.model.qiml.ElementDefinition -------- public class ElementDefinition extends Object ElementDefinition - elementDefinition: Defines an XML element (or an XML attribute, or an attribute list), and a mapping to an instance of a Java class. The target held by elementDefinition defines both the processing of the XML element's text content (or the XML attribute's value) and how the object is constructed. The elementDefinition's held by elementDefinition (or referenced via a link) are the subclasses. Subclass elements can occur within an XML document anywhere the parent element can occur. And when an element can be used as a root, so too can its subclasses. The children (childSelection, childSequence, childElement) held by elementDefinition define the element content of the element. The first child of an element is always the list of attributes. (Attributes have no element content.) (The children of an attribute list are the attributes.) Field Summary protected boolean isIdRef_8 The isIdRef indicates that the attribute is an idref. Constructor Summary ElementDefinition() ElementDefinition(boolean bimodal_6, boolean cdata_10, boolean conditional_9, boolean isIdRef_8, String tagName_4, boolean wild_5, ArrayList rem_11, Target target_12, ArrayList derivedCoins_13, ArrayList contentModel_14) full constructor ElementDefinition(Target target_12) minimum constructor ------------- XML Data Reduced XML ID. idref. X. XML IDREF. idrefs. idrefs. XYZ. XML IDREFS. entity. Foo. XML ENTITY. entities. entities. Foo Bar. XML ENTITIES. nmtoken. Name. XML NMTOKEN ... www.ltg.ed.ac.uk/~ht/XMLData-Reduced.htm - 58k -------------------- xml-dev - Re: XML-LINK and IDREF >Formally, my understanding of ID/IDREF is that it is part of XML-LANG and >must be supported by XML-LANG processors ([50] Validity checks). ... lists.xml.org/archives/xml-dev/199706/msg00010.html - 10k - Cached - Similar pages [ More results from lists.xml.org ] ------------------- .NET 247 : System.Runtime.Remoting.Metadata.W3cXsd2001.SoapIdref ... String Value, Gets or sets an XML IDREF attribute. public static System.String XsdType, Gets the XML Schema definition language (XSD) of the current SOAP ... www.dotnet247.com/247reference/System/ Runtime/Remoting/Metadata/W3cXsd2001/SoapIdref/__members - 16k - Sep 8, 2005 - Cached - Similar pages --------------------- XML tutorial: DTD - Document Type Definition XML tutorial: The XML Revolution - Technologies for the future Web. ... enumeration of allowed values; ID, IDREF, IDREFS: ID attribute values must be unique ... www.brics.dk/~amoeller/XML/schemas/dtd.html - 6k At http://www.brics.dk/~amoeller/XML/schemas/dtd-problems.html: Problems with DTD Top 15 reasons for avoiding DTD: not itself using XML syntax (the SGML heritage can be very unintuitive + if using XML, DTDs could potentially themselves be syntax checked with a "meta DTD") mixed into the XML 1.0 spec (would be much less confusing if specified separately + even non-validating processors must look at the DTD) no constraints on character data (if character data is allowed, any character data is allowed) too simple attribute value models (enumerations are clearly insufficient) cannot mix character data and regexp content models (and the content models are generally hard to use for complex requirements) no support for Namespaces (of course, XML 1.0 was defined before Namespaces) very limited support for modularity and reuse (the entity mechanism is too low-level) no support for schema evolution, extension, or inheritance of declarations (difficult to write, maintain, and read large DTDs, and to define families of related schemas) limited white-space control (xml:space is rarely used) no embedded, structured self-documentation ( are not enough) content and attribute declarations cannot depend on attributes or element context (many XML languages use that, but their DTDs have to "allow too much") too simple ID attribute mechanism (no points-to requirements, uniqueness scope, etc.) only defaults for attributes, not for elements (but that would often be convenient) cannot specify "any element" or "any attribute" (useful for partial specifications and during schema development) defaults cannot be specified separate from the declarations (would be convenient to have defaults in separate modules) ------------------ At http://www.brics.dk/~amoeller/XML/schemas/xmlschema.html: XML Schema W3C Recommendation, May 2001. Consists of two parts: Structures Datatypes Main features: XML syntax (there is a Schema for Schemas) uses and supports Namespaces object-oriented-like type system for declarations (with inheritance, subsumption, abstract types, and finals) global (=top-level) and local (=inlined) type definitions modularization (schema inclusion and redefinitions) structured self-documentation cardinality constraints for sub-elements nil values (missing content) attribute and element defaults any-element, any-attribute uniqueness constraints and ID/IDREF attribute scope regular expressions for specifying valid chardata and attribute values lots of built-in data types for chardata and attribute values Yes, it is big and complicated! (Part 1 of the spec alone is more than 150 dense pages...) ----------------- At http://www.brics.dk/~amoeller/XML/schemas/xmlschema-uniqueness.html: Identity constraints XPath can be used to specify uniqueness requirements. Example: occurring in an element declaration, means that: within each personlist, every ssn attribute of a person element must have a unique value. Similarly, we can define keys (with key) and references (with keyref) which generalizes the ID/IDREF mechanism from DTD in a straightforward way. Only a simple subset of XPath is allowed: only the child axis and the attribute axis only node set expressions -------------- From http://www.brics.dk/~amoeller/XML/schemas/xmlschema-problems.html: Problems with XML Schema The general problem: it is generally too complicated (the spec is several hundred pages in a very technical language), so it is hard to use by non-experts - but many non-experts need schemas to describe data formats also, the complicated design necessitates an incomprehensible specification style (example from Part 1, Section 3.3.1: "{value constraint} establishes a default or fixed value for an element. If default is specified, and if the element being ·validated· is empty, then the canonical form of the supplied constraint value becomes the [schema normalized value] of the ·validated· element in the post-schema-validation infoset. If fixed is specified, then the element's content must either be empty, in which case fixed behaves as default, or its value must match the supplied constraint value.", or from Section 3.3.4: "If the item cannot be ·strictly assessed·, because neither clause 1.1 nor clause 1.2 above are satisfied, [Definition:] an element information item's schema validity may be laxly assessed if its ·context-determined declaration· is not skip by ·validating· with respect to the ·ur-type definition· as per Element Locally Valid (Type) (§3.3.4).") Practical limitations of expressibility: ... For other comments about the design of XML Schema, see for instance www.xml.com/pub/a/2000/07/05/specs/lastword.html, www.ibiblio.org/xql/tally.html , and www.xml.com/pub/a/2002/07/31/wxstypes.html. ----------------- From http://www.brics.dk/~amoeller/XML/schemas/dsd-overview.html: Document Structure Description 2.0 - a successor to DSD 1.0, a schema language developed in cooperation by BRICS and AT&T Labs Research. DSD is designed to: contain few and simple language constructs (based on familiar concepts, such as boolean logic and regular expressions) be easy to understand, also by non-XML-experts have more expressive power than other schema languages for most practical purposes The central ideas in DSD 2.0: a schema consists of a list of rules for every element in the instance document, all rules are processed rules can conditionally depend on the name, attributes, and context of the current element rules contain declare and require sections declare sections specify which content (sub-elements and character data) and attributes that are allowed for the current element require sections specify extra restrictions on content and attributes attribute values and element contents are described by regular expressions rule conditions and extra restrictions are described by boolean logic Main benefits, compared to XML Schema: the complete language specification is only 15 pages (excluding examples) no notion of type, rules are directly tied to element names (and no subtyping, substitution groups, or local definitions) rules can be hierarchical by depending on attribute values and element context DSD is 100% self-describing (so there is a complete "DSD for DSDs") lots of non-essential features are removed or reduced to more basic and general constructs DSD 1.0 was announced in November 1999. The spec for DSD 2.0 is now available! [DSD2.0 is saved at $PH/XMLDocumentStructureDefinition2DSD2.0.htmi - RJL] -------------- xml] IDREF/IDREFS attribute are not validated in xml Schema or ... [xml] IDREF/IDREFS attribute are not validated in xml Schema or RelaxNG ... Hi, I don't know if it's in the TODO list or if it's a bug, but IDREF (and ... mail.gnome.org/archives/xml/2005-March/msg00154.html - 4k - Cached - Similar pages There is a huge thread index. This might be of interest: (from http://mail.gnome.org/archives/xml/2005-March/msg00235.html:) [xml] using --stream with xmllint and DTD validation and in http://mail.gnome.org/archives/xml/2005-August/thread.html#00156: 2005-August Archive by Thread Messages sorted by: [ Thread ] [ Date ] [ Author ] Other months ... [Nothing I have found so far changes my opinion that using XML/IDREF for fkeys is a good idea- except possibly as an element typoe in flat tables, when ALL fkeys are declared as IDREFs. Note that prior normalization of chgen schemas makes possible (and trivial) the representation of .dat files as a list of tables, each table is a list of rows or tuples, each tuple is a list of typed simple scalar fields including pkeys and fkeys of type iskey=1 or iskey=c. I need at least one reason why would I want to go to the trouble of converting a simple and very readable tabular form into non-readable non-editable XML? - RJL050909] -------------------------------------------------------------------------------- From: Andrew McDermott To: xml gnome org Subject: [xml] using --stream with xmllint and DTD validation Date: Fri, 1 Apr 2005 00:10:41 +0100 -------------------------------------------------------------------------------- I have a document and an associated DTD - the XML document has a DTD error in it, but is otherwise correct. If I use: xmllint --postvalid --dtdattr /foo.xml then an error message is displayed, as expected. If I use: xmllint --stream --postvalid --dtdattr /foo.xml then no error message is displayed. The return value ($?) is also 0. Does --stream turn off DTD validation? -------------------- Here is [one month's] thread index URL at gnome: http://mail.gnome.org/archives/xml/2005-August/thread.html#00156 ----------------- [xml] IDREF/IDREFS attribute are not validated in xml Schema or ... To test the IDREF attribute with RelaxNG I took the docbook_0.xml test case and put an incorrect value in an IDREF attribute...but this attribute was in a ... mail.gnome.org/archives/xml/2005-March/msg00158.html - 5k - Cached - Similar pages ------------- From page 3: XML-LINK and IDREFXML-LINK and IDREF. Richard Light richard at light.demon.co.uk ... Is the intention in XML that IDREF(S) attributes are only supported "for compatibility", ... mailman.ic.ac.uk/pipermail/xml-dev/1997-June/000440.html - 5k - Cached - Similar pages [THie above is an interesting discussion of IDREF (for internal use only?) vs. XML-LINK (external refs). ... The full XML-LINK spec is rather daunting for an implementer. (1997) -------------------- XML-LINK and IDREFXML-LINK and IDREF. W. Eliot Kimber eliot at isogen.com ... >Formally, my understanding of ID/IDREF is that it is part of XML-LANG and >must be supported by ... mailman.ic.ac.uk/pipermail/xml-dev/1997-June/000444.html - 6k - Cached - Similar pages From the above: <<In message <0Zm96CAybpkzEwi6 at light.demon.co.uk> Richard Light writes: >> While we're on the subject of linking, I'm intrigued about the status of >> the IDREF attribute type in XML. > >Agreed. I had thought about this as well. It's not easy to see how >both might be used fruitfully at the same time without confusion. > >Formally, my understanding of ID/IDREF is that it is part of XML-LANG and >must be supported by XML-LANG processors ([50] Validity checks). The IDREF >can only point to an ID in the same document (at least how I read it). >Therefore one option is for implementers not to use XML-LINK and to use >ID/IDREF for whatever purposes they wish (structural, annotation, and >with whatever behaviour.) Although I'm not an SGML expert I imagine this >is frequently done already. There are two problem with IDREFS and XML: 1. Without DTDs, it may not be possible to know what attributes are IDs and which are references. 2. IDREFs provide no direct way to address elements in other documents. Therefore, if you want to enable IDREFs, you have to provide some indirection mechanism that can transform an IDREF to an address into other documents. This is what HyTime and the TEI do by providing various location address element forms. If you don't do this, then you require documents to have different element types for elements that use IDREFs and elements that don't. This has the effect of necessarily binding element types to the forms of address they use, which should not normally be necessary (because addressing is distinct from the semantics of reference and therefore shouldn't necessarily influence the element type). Unless I've misunderstood the current spec, XML Link doesn't provide any ID-based indirection method, so that pretty much elimitates direct ID reference in the general case. [However, using the pointer syntax, you can address elements with IDs, but only through the use of an XML Link URL.] Indirect addressing certainly complicates the processing--it requires you to build recursive processes and may impose significant processing overhead. On the other hand, indirect addressing is very powerful and lets you do things that are difficult or impossible otherwise, especially in terms of managing links and addresses automatically, largely because you can isolate initial references from the details of the addresses of the things referenced. Cheers, E. ---------------- ------------------- Re: ID/IDREF problem - In addition to ID/IDREF, XML Schemas Part 1 has a new facility for identity-constraints (using the xsd:unique, xsd:key, xsd:keyref, xsd:selector, ... lists.oasis-open.org/archives/ relax-ng/200103/msg00017.html - 10k - [The above message dated 2001 was the most techncal and informative re: IDREFs. I saved it to $CASE/gen/genxml/doc for your reference: $PH/COOL-GEN/genxml/doc/XML-IDREF-thread-oasis010315.htm -RJL050909] It refers to this URL : http://www.w3.org/2000/12/xmlschema-crcomments.html#ID-value-space which has a nice example of XML spec for this requirement: "A state element is defined, which contains a code child and some vehicle and person children. A vehicle in turn has a plateNumber attribute, which is an integer, and a state attribute. State's codes are a key for them within the document. Vehicle's plateNumbers are a key for them within states, and state and plateNumber is asserted to be a key for vehicle within the document as a whole. Furthermore, a person element has an empty car child, with regState and regPlate attributes, which are then asserted together to refer to vehicles via the carRef constraint. The requirement that a vehicle's state match its containing state's code is not expressed here." ------------------- Eliminating Redundancy in XML Using ID/IDREF @ XML JOURNALXML can be thought of as the 'universal serialization of data.' It provides a flexible, open approach for modeling data and sharing messages among business ... xml.sys-con.com/read/40075.htm - 68k - Cached - Similar pages [RJL: This is also a good article, but missing its 3 source code examples. I saved a .doc file with its URL to the original, as a bookmark; it is also in $CASE/gen/genxml/doc] [The above URL led to a new tool which claims to convert RDBs to/from XML: http://www.altova.com/features_database_mapforce.html It appears to do what Jing Tan suggests - it mentions RDB fkeys but not IDREFs. a trial can be downloaded; I don't know its price.] XML tutorial: DSD - article.dsd, Part IIIXML tutorial: The XML Revolution - Technologies for the future Web. ... =2) then you get a non-unique spanning tree; so you might as well do it for all fkeys. Then the XML tree structure become trivial: Top level: set of tables (homogeneous-item container classes) Middle level: set of table rows (RDB tuples/objects); Bottom level: set of (ordered or named) typed data field (attribute) values. IDREF can serve as a reference type in flat tables; then ALL fkeys can be declared as IDREFs. Note that prior normalization of chgen schemas makes this representation possible (and trivial) A .dat file is a list of tables, each table is a list of rows or tuples, each tuple is a list of typed simple scalar fields including pkeys and fkeys of type iskey=1 or iskey=c. So far, I don't see an application that justifies converting a simple and very readable tabular form into non-readable non-editable XML? - RJL050909]