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

Is there any xml structure for creating and applying group paragraph style?

Advocate ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

Hi all,

          I am looking for xml structure for directly applying styles from group style just like aid:pstyle="test", where if there's any style with name test will be applied directly and if there's none indesign will create one.

Do we have any such kind of xml structure for creating and applying style from a group styles?

Thanks in advance

Sunil

Views

2.3K

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

Guide , Jul 04, 2019 Jul 04, 2019

My guess is that style groups have been added relatively later (CS4?) than XML import (CS3), and support for them by XML import was just not considered.

I currently see these possible approaches:

  1. File a feature request at Uservoice.
  2. Rearrange the styles to follow the observed limitations of the import feature.
  3. Write and use a post processing script for all kinds of adjustments after the import process. That script could for example utilize XML Rules or XPath features of InDesign's XML - which is dif
...

Votes

Translate

Translate
LEGEND ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

Which Adobe product are you asking about?

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
Advocate ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

I am looking for help in Adobe InDesign XML.

Currently InDesign is having two namespaces as : http://ns.adobe.com/AdobeInDesign/4.0/  for paragraph styles and character styles, And second http://ns.adobe.com/AdobeInDesign/5.0/  is for table structure.

My concern is for how to do it for Group styles (Paragraph style/Character style).

Best

Sunil

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
LEGEND ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

Moved to InDesign Forum.

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
Advocate ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

You don't need to move my question to that forum because I've already asked this question on that forum as well but din't receive any help from that forum.

I put that question on this forum thinking I might get some help from here if somebody is having any idea about that.

Thanks

Sunil

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 ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

It's doubtful. XML has very limited group of people using it in InDesign.

You will have more luck looking for scripts to do what you want if you can be more specific. Ask in the InDesign Scripting forum here:

InDesign Scripting.

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
Advocate ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

I understand Steve.

I have already asked this question on InDesign Scripting as well.

Hoping for good

Thanks

Sunil

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
Advocate ,
Jun 24, 2019 Jun 24, 2019

Copy link to clipboard

Copied

@https://forums.adobe.com/people/Steve%20Werner

I can do that with InDesign JavaScript as well but If there's a xml structure for it why should I write code for the same.

If I don't get that XML I'll be writing InDesign JS only.

But reason behind searching for XML is that importing XML is much more faster than executing JS for applying such styles while going in a loop n all.

Thanks

Sunil

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
Participant ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

please try this code

var myDoc = app.activeDocument;

maptagToparastyle('*')

function maptagToparastyle(xmlElement)

{

    ruleSet = new Array (new AddReturns);   

__processRuleSet(myDoc.xmlElements.item(0), ruleSet);   

function AddReturns()   

{   

    this.name = "MapStyles";   

    this.xpath = "//"+ xmlElement;   

    this.apply = function(element)    {   

   

        if (element.xmlAttributes.item("aid:pstyle").isValid){

            var style =  element.xmlAttributes.item("aid:pstyle").value

       

            if (myDoc.paragraphStyles.item(style).isValid)

            {  

                    element.texts[0].applyParagraphStyle(style);   

                }

      }

       

        }   

    } 

}

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
Advocate ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

Hi priyak7746321​,

I am not looking for InDesign JavaScript (I can also write JS).

I am looking for xml structure for Paragraph/Character Group styles Just like there's a namespace for Adobe InDesign for applying paragraph style.

Just add this name space into your xml and import & you don't have write any code, while importing xml only InDesign will apply that paragraph style which is mentioned in that attribute.

If you have any Idea about Group style xml structure please share your knowledge, That would be a great help

Anyway I appreciate your efforts

Thanks

Sunil

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
Participant ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">

<p aid:pstyle="Ind">

I tried within para style group and its working fine for me.

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
Advocate ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

Hi priyak7746321

Can you share some screenshot?

Thanks

Sunil

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
Advocate ,
Jun 25, 2019 Jun 25, 2019

Copy link to clipboard

Copied

Take a look at this,

This is before importing myGroup styles is : GroupStyle1

Screen Shot 2019-06-25 at 4.41.00 PM.png

And this is after I imported XML: (Note: New style gets created named as per attributes : GroupStyle1 outside of group)

Screen Shot 2019-06-25 at 4.42.07 PM.png

XML :

<?xml version='1.0' encoding='UTF-8'?><eduxml xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">

  <p aid:pstyle="GroupStyle1">Test Para For applying Group Style</p>

</eduxml>

If you have something, let me know...

Best

Sunil

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
Guide ,
Jul 04, 2019 Jul 04, 2019

Copy link to clipboard

Copied

My guess is that style groups have been added relatively later (CS4?) than XML import (CS3), and support for them by XML import was just not considered.

I currently see these possible approaches:

  1. File a feature request at Uservoice.
  2. Rearrange the styles to follow the observed limitations of the import feature.
  3. Write and use a post processing script for all kinds of adjustments after the import process. That script could for example utilize XML Rules or XPath features of InDesign's XML - which is different from the ExtendScript XML that you were using in the other forum thread.
  4. Use a different import format - a typical approach would be an externally run XSLT producing an ICML file.
  5. Write a plugin to implement own extensions to the XML import.

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
Advocate ,
Jul 04, 2019 Jul 04, 2019

Copy link to clipboard

Copied

Hi Dirk Becker​,

If xml import wasn't considered I'll leave this thread opened.

I'll write simply a loop of JS to reach my goal.

Thanks you

Sunil

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
Participant ,
Jul 04, 2019 Jul 04, 2019

Copy link to clipboard

Copied

other way convert the ICML  to BackingStory.xml (idml structure). It may solve the issue.

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 ,
Mar 14, 2020 Mar 14, 2020

Copy link to clipboard

Copied

<p aid5:pstyle="TextStyleGroup___Body Indent 1">Here, is your solution.</p>

TextStyleGroup___Body Indent 1

TextStyleGroup: Use group name here

___: use seperator  (i have used 3 undersore, you can use any other)

Body Indent 1: Paragraph style

 

 

For complete referemce see my post rajesh_kumar4

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
Advocate ,
Mar 15, 2020 Mar 15, 2020

Copy link to clipboard

Copied

Hi rajesh_kumar4,

I think you did not read my question properly.

I am also able to write JavaScript to apply group paragraph styles, and also able to put 3 or 1000 underscores.

I am also able to write xslt as well.

My concern was is there any direct XML structure exists or not for applying group styles while importing XML like aid:pstyle.

The post your are refering is nothing but you are applying group paragraph styles from javascript, instead it is not applying those styles while importing into InDesign.

So as Dirk Becker​ suggested that this xml structure for group styles was not considered while developing those.

 

Dirk Becker​ says :

My guess is that style groups have been added relatively later (CS4?) than XML import (CS3), and support for them by XML import was just not considered.

 

If you have any solution over that please share.

 

Thanks

Sunil

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 ,
Mar 16, 2020 Mar 16, 2020

Copy link to clipboard

Copied

It is beyond InDesign scope right now, for coming version it could be possible yoe may talk to Adobe Developer.

 

My concern was is there any direct XML structure exists or not for applying group styles while importing XML like aid:pstyle.

 

 

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
Advocate ,
Mar 16, 2020 Mar 16, 2020

Copy link to clipboard

Copied

LATEST

Yes,

Currently group paragraph styles is not being taken into considaration for XML.

Thanks for your time.

 

Sunil

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 ,
Mar 14, 2020 Mar 14, 2020

Copy link to clipboard

Copied

By the way, have you looked at Adobe FrameMaker? 

It can easily apply paragraph and character styles based on XML tags with an EDD.

With a conversion table, it can wrap XML tags based on para/char styles. (Conversion tables are relatively simple to make for most jobs.)

David Creamer: Community Expert (ACI and ACE 1995-2023)

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
Advocate ,
Mar 15, 2020 Mar 15, 2020

Copy link to clipboard

Copied

Hi,

I am just wondering if any namespaces exists that while importing xml into InDesign, group style should applied.

If no currently I am using JavaScript to do that.

If I can get that XML structure for it, I will get rid off this looping code.

 

Thanks

Sunil

 

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