dita-ot / dita-ot

DITA Open Toolkit — the open-source publishing engine for content authored in the Darwin Information Typing Architecture.
https://www.dita-ot.org
Apache License 2.0
384 stars 192 forks source link

Profiling topicref-elements #532

Closed jelovirt closed 12 years ago

jelovirt commented 12 years ago

Converted from SourceForge issue 2986973, submitted by damos99

Profiling (filtering) topicref-elements based on topicref-attributes that are derived from the props-attribute does not work in DITA-0T1.5. I tried the same in DITA2Go, in which I got it working.

jelovirt commented 12 years ago

Submitted by robander

If I understand this correctly ... it means that you have a specialized props attribute, but when you use a DITAVAL file to filter based on that attribute, the filtering does not work. Is that right?

Thanks

jelovirt commented 12 years ago

Submitted by smalldog

Hi, based on my understanding, I designed a testcase. In test.ditamap, there is:

In filter.ditaval, there is:

The expected result is that the 2nd topicref tag will be filtered out since its audience attribute is "undefined", it is correct? I ran the case with following java cmd: java -jar lib/dost.jar /i:cvf/test.ditamap /outdir:cvf/out /tempdir:cvf/temp /cleantemp:no /transtype:xhtml /filter:C:\20100330\DITA-OT1.5.1\cvf\filter.ditaval

It is ok. Could you provide a testcase that caused the defect?

Regards.

jelovirt commented 12 years ago

Submitted by damos99

Yes Robert, that's how I meant.

jelovirt commented 12 years ago

Submitted by damos99

Smalldog, I don't find your test relevant. Where is your specialized attribute? Audience is an original attribute. What you put as val is completely irrelevant.

Please see Robert's comment to gain an understanding of the issue.

jelovirt commented 12 years ago

Submitted by smalldog

Sorry for the misunderstanding, but could you help to provide a test case to us, it will be helpful for us to track the issue. Thanks!

jelovirt commented 12 years ago

Submitted by damos99

Hi all,

Have you been able to repeat this? Alternatively, is there a fix made? All information about this appreciated as the fixing of this would be of great importance to us. We plan to filter DITA content by up to 20 attributes. So the four original attributes filterable by DITA-OT won't satisfy our needs.

Kind regards, Magnus

jelovirt commented 12 years ago

Submitted by gladmustang

Hi Magnus, As we posted previously, we tried to reproduce the issue, but failed because of lack of the correct test case. We understand the fixing of the issue is important to you, to speed up the progress, can you help to provide your test case to us , including your specialization definitiion on the props attribute, detail information on how to merging your own specialization and steps to reproduce the issue from your side. It will be greate helpful for us to track the issue, thanks.

jelovirt commented 12 years ago

Submitted by damos99

Hi, ok, I'll try to assist you with some more material. It's not really difficult at all to have it re-produced.

Seems that one can't attah files here so I'll try to reply to the e-mail list instead...

Kind regards, Magnus

jelovirt commented 12 years ago

Submitted by damos99

Hi again,

Well, maybe I'll just try to explain the bug here. Don't think I need to attach any files.

I followed this guide when declaring the specialization. It explains it all real well. http://drmacros-xml-rants.blogspot.com/2007/03/tutorial-specializing-dita-conditional.html

How to reproduce the bug:

  1. Follow the guide above to declare the same moon-phase-props-d-attribute, or another.
  2. Create a content file using the above declaration
  3. Run a DITAVAL-filter against that content file and use the specialized attribute for filtering

I'm sure you will based on the guide have no problem reproducing this bug. Sorry for not adding the URL earlier.

Kind regards, Magnus

jelovirt commented 12 years ago

Submitted by damos99

If you still don't get it reproduced, please don't hesitate contacting me.

Thank you, Magnus

jelovirt commented 12 years ago

Submitted by gladmustang

Hi Magnus, Using your provided information, we made an attribute specialization based on props, but we still can not reproduce your issue, below is the steps we try to reproduce: We use the Dita OT 1.5.1 M5 to test above case.

  1. Uncompress the attached filtercase.rar file I uploaded.
  2. Put files in filtercase/dtd folder into ${DITA_HOME}\dtd\technicalContent\dtd folder.
  3. Copy "testdata" folder into ${DITA_HOME}\samples .
  4. Open Dita OT command window, and go into ${DITA_HOME}\samples\testdata
  5. run : ant -f run_test.xml, this is a case with topic2 filtered by the new specialized attribute, you can see in the result index.html that only topic1 appears. You can try this case, if you still have problem, please provide more information to me. BTW, which version of Dita OT you use ?
jelovirt commented 12 years ago

Submitted by damos99

Good morning,

Thank you gladmustang, I got it working now too! Ina ddition to the phase-of-moon I now added also color-of-moon and shape-of-moon and was successful in filtering on all three.

I can not understand what I was missing earlier. I'm using DITA-0T 1.5 and I havn't made any updates too it since I first reported this item.

Kind regards, Magnus

jelovirt commented 12 years ago

Submitted by gladmustang

Set status to "Closed" as it is invalid, so we can track the active bugs more accurate.