On Mon, 2006-02-20 at 13:56 -0500, Daniel Veillard wrote: > On Mon, Feb 20, 2006 at 06:43:34PM +0100, Kasimier Buchcik wrote: > > > line with how XInclude works and imo would make it easy for a user to > > > > I took a look at the XInclude spec, but it seems - to me - to make no > > explicit mention of what happens with ID attributes. It does say what > > to do with IDREF attributes though. > > > > In the "Fragment Inclusion Example" of this spec, the included > > fragment has some ID attributes, which are converted to non-ID > > attributes in the resulting infoset. So I wonder if this example > > is just broken, or is preserving IDness from XIncluded fragments > > just a myth? Did I miss something? > > http://www.w3.org/TR/xinclude/#fragment-example > > Not an error. It is intended.XInclude works at the infoset level, > i.e. IDNess is computed at parse time but a property of the node > (or rather the attribute on the node), and that property is maintained > when genertaing the resulting XIncluded tree. > > Daniel
What confuses me in the XInclude example is the following sentence: "The infoset resulting from resolving inclusions on this document is the same (except for the include history and language properties) as that of the following document:" ... and then the doc with no IDs is displayed. I understand this as: if we parse the document and look at the created infoset, then this (except for the include history and and language properties) is what the result-infoset should look like. The @id on <description id="w002-description" .../> does not have a [attribute type] of ID. If the example would use the xml:id, i.e. <description xml:id="w002-description" .../>, then it would be easier to understand. Hmm, but I don't know if xml:id produces an [attribute type] of ID. However, the XInclude spec also says: "All properties of an information item described in [XML InformationSet] other than those specifically modified by this specification are preserved during inclusion" ... so since ID is not mentioned in the spec, the IDness should be preserved. Regards & thanks for the clarification, Kasimier _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
