I have a set structure for catalog character styles in that all formats for a particular field are grouped in a style group and have to be set up this way for our scripted workflow. I've manually created a template file for all the corresponding xml tags and I'm trying to use the xmlImportMaps.add function to map those with a script since the names will always be the same. I've used the formatting that I think is correct based on some earlier searching. The problem that I'm running into is that the xml map function doesn't seem to be accepting the style group. Here's my code:
Thanks that worked. I was also being a slight idiot and using a document that I had removed some unused styles, instead of using my base document that had all the styles. It can't map to a style if it isn't there.