ExifTool Forum

ExifTool => Developers => Topic started by: Curtis on April 26, 2016, 12:55:35 PM

Title: -listx Flags Bag, Seq and Alt
Post by: Curtis on April 26, 2016, 12:55:35 PM
Hi Phil,

I'm trying to understand how it is determined and what the differences are between the Bag, Seq, Alt Flags Flags for tags as shown in the -listx output.  I made a table of tags that contain any of those Flags and I can't see the logic behind how it is determined which one of those Flags is chosen for a 'Bag' type XML element.  Is there a simple explanation?

Is there a list somewhere that describes all of the Flags given in the -listx output? (some have an obvious meaning, others not sure).

When exiftool reads tag data and then writes it using the -X option, exiftool is consistent and always uses Bag in the XML.

Thanks for any advice!
Curtis
Title: Re: -listx Flags Bag, Seq and Alt
Post by: Curtis on April 26, 2016, 07:05:55 PM
This is the table I created from the -listx output  to try and help figure this out....
Tag Name                                                      Type        Alt    Bag      Seq   Flattened
Tag Name                                        Type       Alt   Bag     Seq  Flattened
HTML-dc:Creator                              question                X       
HTML-dc:Date                                question                X       
HTML-dc:Language                            question          X             
HTML-dc:Publisher                            question          X             
HTML-dc:Relation                            question          X             
HTML-dc:Subject                              question          X             
HTML-dc:Type                                question          X             
XMP-mwg-coll:Collections                    struct            X             
XMP-mwg-kw:HierarchicalKeywords              struct            X          X 
XMP-mwg-kw:HierarchicalKeywords1Children    struct            X          X 
XMP-mwg-kw:HierarchicalKeywords2Children    struct            X          X 
XMP-mwg-kw:HierarchicalKeywords3Children    struct            X          X 
XMP-mwg-kw:HierarchicalKeywords4Children    struct            X          X 
XMP-mwg-kw:HierarchicalKeywords5Children    struct            X          X 
XMP-mwg-rs:RegionList                        struct            X          X 
XMP-MP:RegionInfoRegions                    struct            X          X 
XMP-microsoft:LastKeywordIPTC                string            X             
XMP-microsoft:LastKeywordXMP                string            X             
XMP-expressionmedia:CatalogSets              string            X             
XMP-expressionmedia:People                  string            X             
XMP-lr:HierarchicalSubject                  string            X             
XMP-mediapro:CatalogSets                    string            X             
XMP-mediapro:People                          string            X             
XMP-mediapro:UserFields                      string            X             
XMP-acdsee:Keywords                          string            X             
XMP-acdsee:Snapshots                        string            X             
XMP-cc:Permits                              string            X             
XMP-cc:Prohibits                            string            X             
XMP-cc:Requires                              string            X             
XMP-crs:CircularGradientBasedCorrections    struct                  X       
XMP-crs:CircGradBasedCorrMasks              struct                  X    X 
XMP-crs:GradientBasedCorrections            struct                  X       
XMP-crs:GradientBasedCorrMasks              struct                  X    X 
XMP-crs:PaintBasedCorrections                struct                  X       
XMP-crs:PaintBasedCorrectionMasks            struct                  X    X 
XMP-crs:RedEyeInfo                          string                  X       
XMP-crs:RetouchAreas                        struct                  X       
XMP-crs:RetouchAreaMasks                    struct                  X    X 
XMP-crs:RetouchInfo                          string                  X       
XMP-crs:ToneCurve                            string                  X       
XMP-crs:ToneCurveBlue                        string                  X       
XMP-crs:ToneCurveGreen                      string                  X       
XMP-crs:ToneCurvePV2012                      string                  X       
XMP-crs:ToneCurvePV2012Blue                  string                  X       
XMP-crs:ToneCurvePV2012Green                string                  X       
XMP-crs:ToneCurvePV2012Red                  string                  X       
XMP-crs:ToneCurveRed                        string                  X       
XMP-dc:Contributor                          string            X             
XMP-dc:Creator                              string                  X       
XMP-dc:Date                                  date                    X       
XMP-dc:Language                              string            X             
XMP-dc:Publisher                            string            X             
XMP-dc:Relation                              string            X             
XMP-dc:Subject                              string            X             
XMP-dc:Type                                  string            X             
XMP-digiKam:TagsList                        string                  X       
XMP-exif:CFAPatternValues                    integer                X    X 
XMP-exif:ComponentsConfiguration            integer                X       
XMP-exif:DeviceSettingDescriptionSettings    string                  X    X 
XMP-exif:ISO                                integer                X       
XMP-exif:OECFNames                          string                  X    X 
XMP-exif:OECFValues                          rational                X    X 
XMP-exif:SpatialFrequencyResponseNames      string                  X    X 
XMP-exif:SpatialFrequencyResponseValues      rational                X    X 
XMP-exif:SubjectArea                        integer                X       
XMP-exif:SubjectLocation                    integer                X       
XMP-exifEX:LensInfo                          rational                X       
XMP-ics:SubVersions                          struct            X             
XMP-ics:TagStructure                        struct            X             
XMP-ics:SubLables1                          struct            X          X 
XMP-ics:SubLables2                          struct            X          X 
XMP-ics:SubLables3                          struct            X          X 
XMP-ics:SubLabels4                          struct            X          X 
XMP-ics:SubLabels5                          struct            X          X 
XMP-iptcCore:Scene                          string            X             
XMP-iptcCore:SubjectCode                    string            X             
XMP-iptcExt:AboutCvTerm                      struct            X             
XMP-iptcExt:ArtworkOrObject                  struct            X             
XMP-iptcExt:ArtworkCreator                  string                  X    X 
XMP-iptcExt:ArtworkCreatorID                string                  X    X 
XMP-iptcExt:ArtworkStylePeriod              string            X          X 
XMP-iptcExt:ControlledVocabularyTerm        string            X             
XMP-iptcExt:EmbdEncRightsExpr                struct            X             
XMP-iptcExt:LinkedEncRightsExpr              struct            X             
XMP-iptcExt:LocationCreated                  struct            X             
XMP-iptcExt:LocationCreatedLocationId        string            X          X 
XMP-iptcExt:LocationShown                    struct            X             
XMP-iptcExt:LocationShownLocationId          string            X          X 
XMP-iptcExt:ModelAge                        integer          X             
XMP-iptcExt:OrganisationInImageCode          string            X             
XMP-iptcExt:OrganisationInImageName          string            X             
XMP-iptcExt:PersonInImage                    string            X             
XMP-iptcExt:PersonInImageWDetails            struct            X             
XMP-iptcExt:PersonInImageCharacteristic      struct            X          X 
XMP-iptcExt:PersonInImageId                  string            X          X 
XMP-iptcExt:ProductInImage                  struct            X             
XMP-iptcExt:RegistryID                      struct            X             
XMP-photoshop:DocumentAncestors              string            X             
XMP-photoshop:SupplementalCategories        string            X             
XMP-photoshop:TextLayers                    struct                  X       
XMP-plus:CopyrightOwner                      struct                  X       
XMP-plus:Custom1                            lang_alt          X             
XMP-plus:Custom10                            lang_alt          X             
XMP-plus:Custom2                            lang_alt          X             
XMP-plus:Custom3                            lang_alt          X             
XMP-plus:Custom4                            lang_alt          X             
XMP-plus:Custom5                            lang_alt          X             
XMP-plus:Custom6                            lang_alt          X             
XMP-plus:Custom7                            lang_alt          X             
XMP-plus:Custom8                            lang_alt          X             
XMP-plus:Custom9                            lang_alt          X             
XMP-plus:EndUser                            struct                  X       
XMP-plus:ImageAlterationConstraints          string            X             
XMP-plus:ImageCreator                        struct                  X       
XMP-plus:ImageFileConstraints                string            X             
XMP-plus:ImageSupplier                      struct                  X       
XMP-plus:Licensee                            struct                  X       
XMP-plus:LicenseeProjectReference            string            X             
XMP-plus:LicenseeTransactionID              string            X             
XMP-plus:Licensor                            struct                  X       
XMP-plus:LicensorTransactionID              string            X             
XMP-plus:ModelReleaseID                      string            X             
XMP-plus:OtherLicenseDocuments              string            X             
XMP-plus:PropertyReleaseID                  string            X             
XMP-prism:AggregationType                    string            X             
XMP-prism:AlternateTitle                    struct            X             
XMP-prism:Channel                            struct            X             
XMP-prism:CorporateEntity                    string            X             
XMP-prism:Event                              string            X             
XMP-prism:Genre                              string            X             
XMP-prism:HasAlternative                    string            X             
XMP-prism:HasTranslation                    string            X             
XMP-prism:Industry                          string            X             
XMP-prism:IsAlternativeOf                    string            X             
XMP-prism:ISBN                              string            X             
XMP-prism:IsCorrectionOf                    string            X             
XMP-prism:Keyword                            string            X             
XMP-prism:Link                              string            X             
XMP-prism:Location                          string            X             
XMP-prism:Object                            string            X             
XMP-prism:OffSaleDate                        struct            X             
XMP-prism:OnSaleDate                        struct            X             
XMP-prism:OnSaleDay                          struct            X             
XMP-prism:Organization                      string            X             
XMP-prism:OriginPlatform                    string            X             
XMP-prism:PageRange                          string            X             
XMP-prism:PublicationDate                    struct            X             
XMP-prism:PublicationDisplayDate            struct            X             
XMP-prism:Teaser                            string            X             
XMP-prism:Ticker                            string            X             
XMP-prism:URL                                struct            X             
XMP-prl:Geography                            string            X             
XMP-prl:Industry                            string            X             
XMP-prl:Usage                                string            X             
XMP-pur:AdultContentWarning                  string            X             
XMP-pur:Agreement                            string            X             
XMP-pur:CreditLine                          string            X             
XMP-pur:EmbargoDate                          date              X             
XMP-pur:ExclusivityEndDate                  date              X             
XMP-pur:ExpirationDate                      date              X             
XMP-pur:OptionEndDate                        date              X             
XMP-pur:Permissions                          string            X             
XMP-pur:Restrictions                        string            X             
XMP-tiff:BitsPerSample                      integer                X       
XMP-tiff:PrimaryChromaticities              rational                X       
XMP-tiff:ReferenceBlackWhite                rational                X       
XMP-tiff:TransferFunction                    integer                X       
XMP-tiff:WhitePoint                          rational                X       
XMP-tiff:YCbCrCoefficients                  rational                X       
XMP-tiff:YCbCrSubSampling                    integer                X       
XMP-xmp:Advisory                            string            X             
XMP-xmp:Identifier                          string            X             
XMP-xmp:PageInfo                            struct                  X       
XMP-xmp:Thumbnails                          struct      X                   
XMP-xmpBJ:JobRef                            struct            X             
XMP-xmpDM:ContributedMedia                  struct            X             
XMP-xmpDM:Markers                            struct                  X       
XMP-xmpDM:MarkersCuePointParams              struct                  X    X 
XMP-xmpDM:Tracks                            struct            X             
XMP-xmpDM:TracksMarkers                      struct                  X    X 
XMP-xmpDM:TracksMarkersCuePointParams        struct                  X    X 
XMP-xmpMM:DerivedFromAlternatePaths          string                  X    X 
XMP-xmpMM:History                            struct                  X       
XMP-xmpMM:Ingredients                        struct            X             
XMP-xmpMM:IngredientsAlternatePaths          string                  X    X 
XMP-xmpMM:ManagedFromAlternatePaths          string                  X    X 
XMP-xmpMM:Manifest                          struct            X             
XMP-xmpMM:ManifestReferenceAlternatePaths    string                  X    X 
XMP-xmpMM:Pantry                            struct            X             
XMP-xmpMM:RenditionOfAlternatePaths          string                  X    X 
XMP-xmpMM:Subject                            string                  X       
XMP-xmpMM:Versions                          struct                  X       
XMP-xmpRights:Owner                          string            X             
XMP-xmpTPg:Colorants                        struct                  X       
XMP-xmpTPg:Fonts                            struct            X             
XMP-xmpTPg:ChildFontFiles                    string                  X    X 
XMP-xmpTPg:PlateNames                        string                  X       


Some tag groups like XMP-dc:Contributor and XMP-dc:Creator are in the same g1 group and both strings, yet one is a Bag and the other a Seq, not sure what the difference is in the tags that would make one have its values in a Bag and the other in a Seq.

Thanks for any guidance....
Curtis
Title: Re: -listx Flags Bag, Seq and Alt
Post by: Phil Harvey on April 29, 2016, 09:17:34 AM
Hi Curtis,

The Alt, Bag and Seq lists are part of the XMP specification.  Read the spec for details, but the quick explanation is that Alt is a choice of fixed alternatives, Bag is a group of unordered items, and Seq is a group of ordered items.

- Phil
Title: Re: -listx Flags Bag, Seq and Alt
Post by: Curtis on April 29, 2016, 11:46:45 AM
Thanks Phil...

I have now downloaded the 3 parts of the XMP spec and also the IPTC spec.  So now in my program if a tag has the Seq Flag, I will not sort the items and leave them in the order that they were read, in order to accurately represent those tag values.

Thanks again!
Curtis