The DAM Forum
Welcome, Guest. Please login or register.
May 21, 2013, 02:46:50 AM

Login with username, password and session length
Search:     Advanced search
Jan 9, 2012
John Beardsworth's new Lightroom site
Lightroom Solutions
27960 Posts in 5113 Topics by 2914 Members
Latest Member: imthedamstar
* Home Help Search Login Register
+  The DAM Forum
|-+  DAM Stuff
| |-+  Keywords and Controlled Vocabulary
| | |-+  Need to clean up some hierarchical keywords in XML file
« previous next »
Pages: [1] Print
Author Topic: Need to clean up some hierarchical keywords in XML file  (Read 2642 times)
markpirozzi
Full Member
***
Posts: 179


View Profile
« on: December 09, 2007, 10:28:17 PM »

I tried using hierarchical keywords in Bridge.  I had been redoing my file structure and got it to where I wanted it and I was experimented with bringing the photos into Lightroom.  The keywords were a real mess in LR.  I decided a non-hierarchical system was not so bad and that I didn't need so many - I wanted to undo what I had.  I imported the files into IV and created catalog sets to mirror my most important keywords.  I used File Info in Bridge to remove all the keywords and then used IV to sync the simplified keywords back into the files.

I worked well to a point but there were some persistent hierarchical keywords that kept popping up in Bridge and I couldn't delete them.  And even more would show up when importing into LR.  I think I have tracked this down to these sample lines in the XML sidecar files:

xmlns:lr="http://ns.adobe.com/lightroom/1.0/">
   <lr:hierarchicalSubject>
    <rdf:Bag>
     <rdf:li>People|People-Work</rdf:li>
     <rdf:li>Ratings|2Star|MP: 2Star</rdf:li>
     <rdf:li>Ratings|1Star|MP: 1Star</rdf:li>
    </rdf:Bag>
   </lr:hierarchicalSubject>

Is there a way to automate going through the sidecar files and removing every line between  <rdf:Bag>... <rdf:Bag> ?  The funny thing is I don't remember importing the originals of these files into LR, so I am not sure how these lines got in the file.

Mark



Logged

Mac OSX 10.7, 2009 MacPro
peterkrogh
Administrator
Hero Member
*****
Posts: 5682


View Profile
« Reply #1 on: December 10, 2007, 06:37:21 AM »

Mark,
I don't know of a way to crawl through the files removing this field.  Would be a useful utility.
Peter
Logged
markpirozzi
Full Member
***
Posts: 179


View Profile
« Reply #2 on: December 10, 2007, 05:52:42 PM »

Thanks.

Mark
Logged

Mac OSX 10.7, 2009 MacPro
johnbeardy
Administrator
Hero Member
*****
Posts: 1813


View Profile WWW
« Reply #3 on: December 11, 2007, 12:37:07 AM »

You'd need to write an XSLT stylesheet to transform the XML. Various XML editors or Dreamweaver could help do the job, and you could write the XSLT with a text editor, though you're going into geeky territory and may not emerge unscathed.

John
Logged
havezet
Full Member
***
Posts: 176



View Profile WWW
« Reply #4 on: December 11, 2007, 04:44:38 PM »

removing every line between  <rdf:Bag>... <rdf:Bag> ?

Mark, before you start on this, you should *not* remove everything between <rdf:Bag>..</rdf:Bag> but between <lr:hierarchicalSubject>...</lr:hierarchicalSubject>. That should prevent you from deleting unexpected entries from your XMP.

Hert
« Last Edit: December 11, 2007, 04:46:19 PM by havezet » Logged

Author of IDimager
http://www.idimager.com
markpirozzi
Full Member
***
Posts: 179


View Profile
« Reply #5 on: December 11, 2007, 05:37:07 PM »

John,

I figured the solution was a little out of my league.


Hert,

I thought I made a follow up post but I must have replied to the wrong thread.  I have done some experimentation with Bridge settings and keywords and little with Lightroom.  I can make Bridge remove those entries. It appears that Bridge reads and writes entries between   xmlns:lr="http://ns.adobe.com/lightroom/1.0/"><lr:hierarchicalSubject>...</lr:hierarchicalSubject>,  but LR only reads them.  In fact when using NEFs and sidecar files, I can't see that LR writes keywords to the sidecar files, even if Automatically write to XML is checked.   


Mark


Logged

Mac OSX 10.7, 2009 MacPro
markpirozzi
Full Member
***
Posts: 179


View Profile
« Reply #6 on: December 13, 2007, 04:48:48 PM »

I can't seem to duplicate removing hierarchal keywords in the Lightroom section of the sidecar files short of opening the sidecar files one at a time.  However, by having pared down my keyword vocabulary in Bridge and getting uniformity, the cleanup in Lightroom should not be to bad.

Mark
Logged

Mac OSX 10.7, 2009 MacPro
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!