• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

XML Tag to Style for only one of the tags

Community Beginner ,
Jul 16, 2024 Jul 16, 2024

Copy link to clipboard

Copied

Hello! We have created our first working xml import from our JATS XML documents and have mapped all styles as needed... or so we tought. Now the volume is final, with several local modifications to improve the typesettings and we were asked to change the style of an inline element (citation_key). The good thing is, the tag is already in the text, the bad thing is we don't want to use again "Tag to Style" option, because it will destroy all the manual typesetting. The citation keys are several hundreds...

Can I somehow select the tagged text to apply a character style? is a script my only option? 

Can I apply only one style and keep all the other safe/locked?

TOPICS
How to , Import and export , Publish online , Scripting

Views

332

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 23, 2024 Jul 23, 2024
quote

Yes @Robert at ID-Tasker  this is my goal. Usually I go to structure options "TAG to style" but this revert any local formatting to base style which is lovely when your file is at the beginning, but totally useless at a later point in typesetting.


By @Elisa31993471y7dh

 

If you work on a PC - piece of cake. My tool - not free - can load XML structure as a "flat" database - rows as records and fields/columns as XML Tags - so you can format only texts with specific XML Tag(s) applied.

 

RobertatIDTasker_0-1721725962302.png

It's an

...

Votes

Translate

Translate
Community Expert ,
Jul 16, 2024 Jul 16, 2024

Copy link to clipboard

Copied

If you already have mapped xml tags to styles, couldn't you just edit the character style?

Mike Witherell

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 17, 2024 Jul 17, 2024

Copy link to clipboard

Copied

My bad for not explaining clearly. I had not created a character style for the object since it was formatted as the main paragraph in volume 1 & 2  (manual volumes). Unfortunately this time someone on the top decided they wanted the citation keys on bold. Right now we have used a regex and manully checked all the 350+ instances, but I was curious, because evey time I adda mapping *after* typesetting the previuos work on *all* tags is reverted to "style" and I was wondering if I can only map the new tag/style without trashing all the work. Funny enought, you are warned about the problem when doing style to tag, but not the opposite.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

When you do a GREP Search there is an option to markup the found text with an XML Tag. It can be found under Replace Style. Hope this helps

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

thanks, this might be useful in the future. My goal was actually the opposite, search for tags and apply style. Hopefully next time the needed connection will be there before we proceed with the local typesettings.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

@Elisa31993471y7dh 

 

Do I understand you correctly - you have texts that have XML Tag appllied - but without a CharStyle appliled and you want to style them differently / apply CharStyle, right?

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

Yes @Robert at ID-Tasker  this is my goal. Usually I go to structure options "TAG to style" but this revert any local formatting to base style which is lovely when your file is at the beginning, but totally useless at a later point in typesetting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

quote

Yes @Robert at ID-Tasker  this is my goal. Usually I go to structure options "TAG to style" but this revert any local formatting to base style which is lovely when your file is at the beginning, but totally useless at a later point in typesetting.


By @Elisa31993471y7dh

 

If you work on a PC - piece of cake. My tool - not free - can load XML structure as a "flat" database - rows as records and fields/columns as XML Tags - so you can format only texts with specific XML Tag(s) applied.

 

RobertatIDTasker_0-1721725962302.png

It's an example of a German TV program - double click on a cell - red rectangle - takes you directly to the text in the document - "navigation" mode.

 

Or you can style ALL texts in the specified "column" - specified XML Tag applied.

 

(This XML has been styled / formatted with my other tool, that I've created for my friend to format TV Guide - 15 TV stations per week - with much greater functionality than just mapping styles to tags - video - everything there - browsing and show/hide of fields is done through my TV Guide tool - InDesign is just a "renderer"/preview)

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 23, 2024 Jul 23, 2024

Copy link to clipboard

Copied

LATEST

Thanks, I will give it a look when we typeset next volume.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines