Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Module Richtext Contents - Text vs Modules schema method

If you want to publish the richtext contents of a module it seems like there are 2 methods:

1.
  Create a template with only the Text schema.
  In the template Publish the dataSource/artifact/content/text/richTextBody/div/value
  In the DSX pass this template Text schema the text?moduleURI
  https://server:port/rm/publish/text?moduleURI=module1
  e.g.  https://localhost:9443/rm/publish/text?moduleURI=_F8ptYCYOEeiWbapxO14vMQ

or

2.
  (this is the method used in DNG Module.dta)

  Create a template with both the Text schema and the Modules schema.
  In the template iterate over the contents of the module schema
  Then grab the <about> URI for each artifact and use dynamic data configuration to grab the URI content of each artifact in the module. 
  Then use the Text schema to extract the richtext for each artifact using its <about> URI
  In the DSX pass this template module schema the modules?moduleURI
  https://server:port/rm/publish/modules?moduleURI=module1
  e.g.  https://localhost:9443/rm/publish/modules?resourceURI=_F8ptYCYOEeiWbapxO14vMQ

The second method seems more complicated but it is the method used in the shipped example DNG Module.dta

Why are there 2 very different methods to achieve the same result and why is the more complex method the one that is demonstrated in youtube examples and shipped with the sample template?

0 votes

Comments

You are right Sean. To print rich text content, you can use only text schema and set the data source URI as https://server:port/rm/publish/text?moduleURI=module1

However if you also want include module details / bindings / hierarchy, you can start with modules schema. The sample template DNG Module.dta mainly showcases how to configure the data sources for different artifact formats within the module.


Accepted answer

Permanent link

Hi Sean,

Artifacts in DNG could be of many types like module, text, diagram, etc.

General REST URL patterns
module: /rm/publish/modules?resourceURI=UUID
text: /rm/publish/text?resourceURI=UUID
resource: /rm/publish/resource?resourceURI=UUID

A module contains number of requirements of different kinds of artifacts, like text, diagram, etc. The REST URL XML of module doesn't expose details requirements for individual requirements. Hence, you'll have to use text schema to get dataSource/artifact/content/text/richTextBody/div/value.

Simplified REST URL would be to use OSLC URL + pox header.
OSLC URL: https://rmserver:9443/rm/resources/_a1771643c32e400e84ad90f0994ec71a

pox profile

More details under https://rpeactual.com/2016/07/03/oslc-api-and-pox-profile-simplifies-clm-traceability/

Thanks,
Kumar

Thanks,
Kumar

Sean F selected this answer as the correct answer

0 votes


6 other answers

Permanent link

^thanks Kumar
^thanks Prasad

When you say

>>However if you also want include module details / bindings / hierarchy...

So what does this translate to in terms of results? - like what is an example of something you can do using the 'modules' schema that you cannot do by simply using the 'text' schema and passing it a module parameter via the DSX?

Just curious since the 'modules' schema is the example used in youtube tutorials etc. but it seems more complex to configure and I cannot see what the advantages are.

0 votes


Permanent link

The only advantage I have been able to see so far of starting with the Module schema is that you can grab the name of the module itself before changing schema to process the module contents artifacts.
Is there any other advantage?

0 votes


Permanent link

OK I found another advantage of using the Module schema.
If you use the Module schema then you can use a numbered stylesheet and get numbered headings.
If you just iterate through the artifacts using the Text schema then all headings come out as level 1.

0 votes


Permanent link

Good points.

As we mentioned before, module schema and REST xml data does not provide individual requirement (xhtml table, rich text, etc) details. For example, if there is a text req in a module, with module schema you only get title, identifier and basic details. To get detailed requirement text, you need to use text schema with query dataSource/artifact/content/text/richTextBody/div/value

0 votes


Permanent link

Thanks Kumar.

I now understand that using the Module schema gives

1. Module Title
2. Module heading hierarchy structure

Is there any other benefit that you get from using Module schema as well as Text schema, instead of just Text schema, for printing out the richtext contents of a module in sequential order?

0 votes

Comments

Not anything that I could think of.

Thanks Kumar


Permanent link

Not anything that I could think of.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,015

Question asked: Apr 13 '18, 12:36 p.m.

Question was seen: 3,394 times

Last updated: Apr 16 '18, 3:10 a.m.

Confirmation Cancel Confirm