You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Amardeep Singh Jhajj <am...@hotwaxsystems.com> on 2016/06/04 07:27:28 UTC

PDF's missing child block element errors

Hi Community,

We have recently seen many issues related to missing child block elements
in PDF, we normally fix it by adding missing elements. Some of the tickets-
OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>, OFBIZ-6898
<https://issues.apache.org/jira/browse/OFBIZ-6898> etc.

Today, I found this issue again in trunk in accounting trans PDF. Please
refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>

I also checked it in our other releases 13.07 and 14.12, it worked. So it
was the question that what is changed after 14.12 release that causes this
issue.

I done some research and found that we have changed the fop jar from
fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change available in
both the 15.12 (cut from trunk after change) and trunk.

In release 14.12, in ApacheFopWorker.java "getFactoryInstance" method, we
have below code snippet

fopFactory.setStrictValidation(false);

Actually, XSL-FO validation is by default active. By above code, validation
was deactivated.

On looking at commit at -r1691852, we have upgraded to fop-2.0 and removed
the above code which deactivates validation. In 2.0, setStrictValidation
method is not present instead we can use configuration property
"strict-validation" with value "false". This configuration property exists
in both the fop 1.0 and 2.0.

Please refer:

https://xmlgraphics.apache.org/fop/1.0/configuration.html
https://xmlgraphics.apache.org/fop/2.0/configuration.html

We can disable validation using below code snippet in fop.xconf.

<strict-validation>false</strict-validation>

I am able to open PDF using it. We can say, no strict validation of markup
done here.

But, I would prefer validation enabled as it helps us to write correct
markup of XSL-FO. We may see similar kind of issues in future due to strict
validation and we can fix it.

Should we do validation false or not? Please let me know your thoughts.

Thanks and Regards
--
Amardeep Singh Jhajj
www.hotwaxsystems.com

Re: PDF's missing child block element errors

Posted by Jacopo Cappellato <ja...@hotwaxsystems.com>.
Thanks Amardeep for the great analysis: I agree with you, Mridul, Pranay,
Jacques and Deepak about maintaining the strict validation on.

Jacopo

On Tue, Jun 7, 2016 at 11:59 AM, Amardeep Singh Jhajj <
amardeep.jhajj@hotwaxsystems.com> wrote:

> Thanks everyone for suggestions. We all are on same page :)
>
> Lets move forward with validation enabled.
>
> Regards,
> --
> Amardeep Singh Jhajj
> www.hotwaxsystems.com
>
> On Mon, Jun 6, 2016 at 12:07 PM, Deepak Dixit <
> deepak.dixit@hotwaxsystems.com> wrote:
>
> > +1 for validation.
> >
> > Thanks & Regards
> > --
> > Deepak Dixit
> > www.hotwaxsystems.com
> >
> > On Sun, Jun 5, 2016 at 1:05 AM, Jacques Le Roux <
> > jacques.le.roux@les7arts.com> wrote:
> >
> > > I agree with Mridul and Pranay
> > >
> > > Thanks Amardeep!
> > >
> > > Jacques
> > >
> > >
> > >
> > > Le 04/06/2016 à 12:55, Pranay Pandey a écrit :
> > >
> > >> +1 to keep the validation enabled.
> > >>
> > >> Best regards,
> > >>
> > >> Pranay Pandey
> > >> HotWax Systems
> > >> http://www.hotwaxsystems.com/
> > >>
> > >> On Sat, Jun 4, 2016 at 4:15 PM, Mridul Pathak <
> > >> mridul.pathak@hotwaxsystems.com> wrote:
> > >>
> > >> Hi Amardeep,
> > >>>
> > >>> Thanks for bringing it up. I believe we should keep validation
> enabled
> > to
> > >>> follow best practices and better code quality. It’s good that we are
> > >>> noticing these issues due to change in validation jars.
> > >>>
> > >>> --
> > >>> Thanks & Regards,
> > >>> Mridul Pathak
> > >>> Senior Manager
> > >>> HotWax Systems
> > >>> http://www.hotwaxsystems.com
> > >>>
> > >>> On Jun 4, 2016, at 12:57 PM, Amardeep Singh Jhajj <
> > >>>>
> > >>> amardeep.jhajj@hotwaxsystems.com> wrote:
> > >>>
> > >>>> Hi Community,
> > >>>>
> > >>>> We have recently seen many issues related to missing child block
> > >>>> elements
> > >>>> in PDF, we normally fix it by adding missing elements. Some of the
> > >>>>
> > >>> tickets-
> > >>>
> > >>>> OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>,
> > >>>>
> > >>> OFBIZ-6898
> > >>>
> > >>>> <https://issues.apache.org/jira/browse/OFBIZ-6898> etc.
> > >>>>
> > >>>> Today, I found this issue again in trunk in accounting trans PDF.
> > Please
> > >>>> refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>
> > >>>>
> > >>>> I also checked it in our other releases 13.07 and 14.12, it worked.
> So
> > >>>> it
> > >>>> was the question that what is changed after 14.12 release that
> causes
> > >>>>
> > >>> this
> > >>>
> > >>>> issue.
> > >>>>
> > >>>> I done some research and found that we have changed the fop jar from
> > >>>> fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change
> available
> > >>>> in
> > >>>> both the 15.12 (cut from trunk after change) and trunk.
> > >>>>
> > >>>> In release 14.12, in ApacheFopWorker.java "getFactoryInstance"
> method,
> > >>>> we
> > >>>> have below code snippet
> > >>>>
> > >>>> fopFactory.setStrictValidation(false);
> > >>>>
> > >>>> Actually, XSL-FO validation is by default active. By above code,
> > >>>>
> > >>> validation
> > >>>
> > >>>> was deactivated.
> > >>>>
> > >>>> On looking at commit at -r1691852, we have upgraded to fop-2.0 and
> > >>>>
> > >>> removed
> > >>>
> > >>>> the above code which deactivates validation. In 2.0,
> > setStrictValidation
> > >>>> method is not present instead we can use configuration property
> > >>>> "strict-validation" with value "false". This configuration property
> > >>>>
> > >>> exists
> > >>>
> > >>>> in both the fop 1.0 and 2.0.
> > >>>>
> > >>>> Please refer:
> > >>>>
> > >>>> https://xmlgraphics.apache.org/fop/1.0/configuration.html
> > >>>> https://xmlgraphics.apache.org/fop/2.0/configuration.html
> > >>>>
> > >>>> We can disable validation using below code snippet in fop.xconf.
> > >>>>
> > >>>> <strict-validation>false</strict-validation>
> > >>>>
> > >>>> I am able to open PDF using it. We can say, no strict validation of
> > >>>>
> > >>> markup
> > >>>
> > >>>> done here.
> > >>>>
> > >>>> But, I would prefer validation enabled as it helps us to write
> correct
> > >>>> markup of XSL-FO. We may see similar kind of issues in future due to
> > >>>>
> > >>> strict
> > >>>
> > >>>> validation and we can fix it.
> > >>>>
> > >>>> Should we do validation false or not? Please let me know your
> > thoughts.
> > >>>>
> > >>>> Thanks and Regards
> > >>>> --
> > >>>> Amardeep Singh Jhajj
> > >>>> www.hotwaxsystems.com
> > >>>>
> > >>>
> > >>>
> > >
> >
>

Re: PDF's missing child block element errors

Posted by Amardeep Singh Jhajj <am...@hotwaxsystems.com>.
Thanks everyone for suggestions. We all are on same page :)

Lets move forward with validation enabled.

Regards,
--
Amardeep Singh Jhajj
www.hotwaxsystems.com

On Mon, Jun 6, 2016 at 12:07 PM, Deepak Dixit <
deepak.dixit@hotwaxsystems.com> wrote:

> +1 for validation.
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Sun, Jun 5, 2016 at 1:05 AM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
> > I agree with Mridul and Pranay
> >
> > Thanks Amardeep!
> >
> > Jacques
> >
> >
> >
> > Le 04/06/2016 à 12:55, Pranay Pandey a écrit :
> >
> >> +1 to keep the validation enabled.
> >>
> >> Best regards,
> >>
> >> Pranay Pandey
> >> HotWax Systems
> >> http://www.hotwaxsystems.com/
> >>
> >> On Sat, Jun 4, 2016 at 4:15 PM, Mridul Pathak <
> >> mridul.pathak@hotwaxsystems.com> wrote:
> >>
> >> Hi Amardeep,
> >>>
> >>> Thanks for bringing it up. I believe we should keep validation enabled
> to
> >>> follow best practices and better code quality. It’s good that we are
> >>> noticing these issues due to change in validation jars.
> >>>
> >>> --
> >>> Thanks & Regards,
> >>> Mridul Pathak
> >>> Senior Manager
> >>> HotWax Systems
> >>> http://www.hotwaxsystems.com
> >>>
> >>> On Jun 4, 2016, at 12:57 PM, Amardeep Singh Jhajj <
> >>>>
> >>> amardeep.jhajj@hotwaxsystems.com> wrote:
> >>>
> >>>> Hi Community,
> >>>>
> >>>> We have recently seen many issues related to missing child block
> >>>> elements
> >>>> in PDF, we normally fix it by adding missing elements. Some of the
> >>>>
> >>> tickets-
> >>>
> >>>> OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>,
> >>>>
> >>> OFBIZ-6898
> >>>
> >>>> <https://issues.apache.org/jira/browse/OFBIZ-6898> etc.
> >>>>
> >>>> Today, I found this issue again in trunk in accounting trans PDF.
> Please
> >>>> refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>
> >>>>
> >>>> I also checked it in our other releases 13.07 and 14.12, it worked. So
> >>>> it
> >>>> was the question that what is changed after 14.12 release that causes
> >>>>
> >>> this
> >>>
> >>>> issue.
> >>>>
> >>>> I done some research and found that we have changed the fop jar from
> >>>> fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change available
> >>>> in
> >>>> both the 15.12 (cut from trunk after change) and trunk.
> >>>>
> >>>> In release 14.12, in ApacheFopWorker.java "getFactoryInstance" method,
> >>>> we
> >>>> have below code snippet
> >>>>
> >>>> fopFactory.setStrictValidation(false);
> >>>>
> >>>> Actually, XSL-FO validation is by default active. By above code,
> >>>>
> >>> validation
> >>>
> >>>> was deactivated.
> >>>>
> >>>> On looking at commit at -r1691852, we have upgraded to fop-2.0 and
> >>>>
> >>> removed
> >>>
> >>>> the above code which deactivates validation. In 2.0,
> setStrictValidation
> >>>> method is not present instead we can use configuration property
> >>>> "strict-validation" with value "false". This configuration property
> >>>>
> >>> exists
> >>>
> >>>> in both the fop 1.0 and 2.0.
> >>>>
> >>>> Please refer:
> >>>>
> >>>> https://xmlgraphics.apache.org/fop/1.0/configuration.html
> >>>> https://xmlgraphics.apache.org/fop/2.0/configuration.html
> >>>>
> >>>> We can disable validation using below code snippet in fop.xconf.
> >>>>
> >>>> <strict-validation>false</strict-validation>
> >>>>
> >>>> I am able to open PDF using it. We can say, no strict validation of
> >>>>
> >>> markup
> >>>
> >>>> done here.
> >>>>
> >>>> But, I would prefer validation enabled as it helps us to write correct
> >>>> markup of XSL-FO. We may see similar kind of issues in future due to
> >>>>
> >>> strict
> >>>
> >>>> validation and we can fix it.
> >>>>
> >>>> Should we do validation false or not? Please let me know your
> thoughts.
> >>>>
> >>>> Thanks and Regards
> >>>> --
> >>>> Amardeep Singh Jhajj
> >>>> www.hotwaxsystems.com
> >>>>
> >>>
> >>>
> >
>

Re: PDF's missing child block element errors

Posted by Deepak Dixit <de...@hotwaxsystems.com>.
+1 for validation.

Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com

On Sun, Jun 5, 2016 at 1:05 AM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> I agree with Mridul and Pranay
>
> Thanks Amardeep!
>
> Jacques
>
>
>
> Le 04/06/2016 à 12:55, Pranay Pandey a écrit :
>
>> +1 to keep the validation enabled.
>>
>> Best regards,
>>
>> Pranay Pandey
>> HotWax Systems
>> http://www.hotwaxsystems.com/
>>
>> On Sat, Jun 4, 2016 at 4:15 PM, Mridul Pathak <
>> mridul.pathak@hotwaxsystems.com> wrote:
>>
>> Hi Amardeep,
>>>
>>> Thanks for bringing it up. I believe we should keep validation enabled to
>>> follow best practices and better code quality. It’s good that we are
>>> noticing these issues due to change in validation jars.
>>>
>>> --
>>> Thanks & Regards,
>>> Mridul Pathak
>>> Senior Manager
>>> HotWax Systems
>>> http://www.hotwaxsystems.com
>>>
>>> On Jun 4, 2016, at 12:57 PM, Amardeep Singh Jhajj <
>>>>
>>> amardeep.jhajj@hotwaxsystems.com> wrote:
>>>
>>>> Hi Community,
>>>>
>>>> We have recently seen many issues related to missing child block
>>>> elements
>>>> in PDF, we normally fix it by adding missing elements. Some of the
>>>>
>>> tickets-
>>>
>>>> OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>,
>>>>
>>> OFBIZ-6898
>>>
>>>> <https://issues.apache.org/jira/browse/OFBIZ-6898> etc.
>>>>
>>>> Today, I found this issue again in trunk in accounting trans PDF. Please
>>>> refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>
>>>>
>>>> I also checked it in our other releases 13.07 and 14.12, it worked. So
>>>> it
>>>> was the question that what is changed after 14.12 release that causes
>>>>
>>> this
>>>
>>>> issue.
>>>>
>>>> I done some research and found that we have changed the fop jar from
>>>> fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change available
>>>> in
>>>> both the 15.12 (cut from trunk after change) and trunk.
>>>>
>>>> In release 14.12, in ApacheFopWorker.java "getFactoryInstance" method,
>>>> we
>>>> have below code snippet
>>>>
>>>> fopFactory.setStrictValidation(false);
>>>>
>>>> Actually, XSL-FO validation is by default active. By above code,
>>>>
>>> validation
>>>
>>>> was deactivated.
>>>>
>>>> On looking at commit at -r1691852, we have upgraded to fop-2.0 and
>>>>
>>> removed
>>>
>>>> the above code which deactivates validation. In 2.0, setStrictValidation
>>>> method is not present instead we can use configuration property
>>>> "strict-validation" with value "false". This configuration property
>>>>
>>> exists
>>>
>>>> in both the fop 1.0 and 2.0.
>>>>
>>>> Please refer:
>>>>
>>>> https://xmlgraphics.apache.org/fop/1.0/configuration.html
>>>> https://xmlgraphics.apache.org/fop/2.0/configuration.html
>>>>
>>>> We can disable validation using below code snippet in fop.xconf.
>>>>
>>>> <strict-validation>false</strict-validation>
>>>>
>>>> I am able to open PDF using it. We can say, no strict validation of
>>>>
>>> markup
>>>
>>>> done here.
>>>>
>>>> But, I would prefer validation enabled as it helps us to write correct
>>>> markup of XSL-FO. We may see similar kind of issues in future due to
>>>>
>>> strict
>>>
>>>> validation and we can fix it.
>>>>
>>>> Should we do validation false or not? Please let me know your thoughts.
>>>>
>>>> Thanks and Regards
>>>> --
>>>> Amardeep Singh Jhajj
>>>> www.hotwaxsystems.com
>>>>
>>>
>>>
>

Re: PDF's missing child block element errors

Posted by Jacques Le Roux <ja...@les7arts.com>.
I agree with Mridul and Pranay

Thanks Amardeep!

Jacques


Le 04/06/2016 � 12:55, Pranay Pandey a �crit :
> +1 to keep the validation enabled.
>
> Best regards,
>
> Pranay Pandey
> HotWax Systems
> http://www.hotwaxsystems.com/
>
> On Sat, Jun 4, 2016 at 4:15 PM, Mridul Pathak <
> mridul.pathak@hotwaxsystems.com> wrote:
>
>> Hi Amardeep,
>>
>> Thanks for bringing it up. I believe we should keep validation enabled to
>> follow best practices and better code quality. It\u2019s good that we are
>> noticing these issues due to change in validation jars.
>>
>> --
>> Thanks & Regards,
>> Mridul Pathak
>> Senior Manager
>> HotWax Systems
>> http://www.hotwaxsystems.com
>>
>>> On Jun 4, 2016, at 12:57 PM, Amardeep Singh Jhajj <
>> amardeep.jhajj@hotwaxsystems.com> wrote:
>>> Hi Community,
>>>
>>> We have recently seen many issues related to missing child block elements
>>> in PDF, we normally fix it by adding missing elements. Some of the
>> tickets-
>>> OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>,
>> OFBIZ-6898
>>> <https://issues.apache.org/jira/browse/OFBIZ-6898> etc.
>>>
>>> Today, I found this issue again in trunk in accounting trans PDF. Please
>>> refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>
>>>
>>> I also checked it in our other releases 13.07 and 14.12, it worked. So it
>>> was the question that what is changed after 14.12 release that causes
>> this
>>> issue.
>>>
>>> I done some research and found that we have changed the fop jar from
>>> fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change available in
>>> both the 15.12 (cut from trunk after change) and trunk.
>>>
>>> In release 14.12, in ApacheFopWorker.java "getFactoryInstance" method, we
>>> have below code snippet
>>>
>>> fopFactory.setStrictValidation(false);
>>>
>>> Actually, XSL-FO validation is by default active. By above code,
>> validation
>>> was deactivated.
>>>
>>> On looking at commit at -r1691852, we have upgraded to fop-2.0 and
>> removed
>>> the above code which deactivates validation. In 2.0, setStrictValidation
>>> method is not present instead we can use configuration property
>>> "strict-validation" with value "false". This configuration property
>> exists
>>> in both the fop 1.0 and 2.0.
>>>
>>> Please refer:
>>>
>>> https://xmlgraphics.apache.org/fop/1.0/configuration.html
>>> https://xmlgraphics.apache.org/fop/2.0/configuration.html
>>>
>>> We can disable validation using below code snippet in fop.xconf.
>>>
>>> <strict-validation>false</strict-validation>
>>>
>>> I am able to open PDF using it. We can say, no strict validation of
>> markup
>>> done here.
>>>
>>> But, I would prefer validation enabled as it helps us to write correct
>>> markup of XSL-FO. We may see similar kind of issues in future due to
>> strict
>>> validation and we can fix it.
>>>
>>> Should we do validation false or not? Please let me know your thoughts.
>>>
>>> Thanks and Regards
>>> --
>>> Amardeep Singh Jhajj
>>> www.hotwaxsystems.com
>>


Re: PDF's missing child block element errors

Posted by Pranay Pandey <pr...@hotwaxsystems.com>.
+1 to keep the validation enabled.

Best regards,

Pranay Pandey
HotWax Systems
http://www.hotwaxsystems.com/

On Sat, Jun 4, 2016 at 4:15 PM, Mridul Pathak <
mridul.pathak@hotwaxsystems.com> wrote:

> Hi Amardeep,
>
> Thanks for bringing it up. I believe we should keep validation enabled to
> follow best practices and better code quality. It’s good that we are
> noticing these issues due to change in validation jars.
>
> --
> Thanks & Regards,
> Mridul Pathak
> Senior Manager
> HotWax Systems
> http://www.hotwaxsystems.com
>
> > On Jun 4, 2016, at 12:57 PM, Amardeep Singh Jhajj <
> amardeep.jhajj@hotwaxsystems.com> wrote:
> >
> > Hi Community,
> >
> > We have recently seen many issues related to missing child block elements
> > in PDF, we normally fix it by adding missing elements. Some of the
> tickets-
> > OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>,
> OFBIZ-6898
> > <https://issues.apache.org/jira/browse/OFBIZ-6898> etc.
> >
> > Today, I found this issue again in trunk in accounting trans PDF. Please
> > refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>
> >
> > I also checked it in our other releases 13.07 and 14.12, it worked. So it
> > was the question that what is changed after 14.12 release that causes
> this
> > issue.
> >
> > I done some research and found that we have changed the fop jar from
> > fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change available in
> > both the 15.12 (cut from trunk after change) and trunk.
> >
> > In release 14.12, in ApacheFopWorker.java "getFactoryInstance" method, we
> > have below code snippet
> >
> > fopFactory.setStrictValidation(false);
> >
> > Actually, XSL-FO validation is by default active. By above code,
> validation
> > was deactivated.
> >
> > On looking at commit at -r1691852, we have upgraded to fop-2.0 and
> removed
> > the above code which deactivates validation. In 2.0, setStrictValidation
> > method is not present instead we can use configuration property
> > "strict-validation" with value "false". This configuration property
> exists
> > in both the fop 1.0 and 2.0.
> >
> > Please refer:
> >
> > https://xmlgraphics.apache.org/fop/1.0/configuration.html
> > https://xmlgraphics.apache.org/fop/2.0/configuration.html
> >
> > We can disable validation using below code snippet in fop.xconf.
> >
> > <strict-validation>false</strict-validation>
> >
> > I am able to open PDF using it. We can say, no strict validation of
> markup
> > done here.
> >
> > But, I would prefer validation enabled as it helps us to write correct
> > markup of XSL-FO. We may see similar kind of issues in future due to
> strict
> > validation and we can fix it.
> >
> > Should we do validation false or not? Please let me know your thoughts.
> >
> > Thanks and Regards
> > --
> > Amardeep Singh Jhajj
> > www.hotwaxsystems.com
>
>

Re: PDF's missing child block element errors

Posted by Mridul Pathak <mr...@hotwaxsystems.com>.
Hi Amardeep,

Thanks for bringing it up. I believe we should keep validation enabled to follow best practices and better code quality. It’s good that we are noticing these issues due to change in validation jars.

--
Thanks & Regards,
Mridul Pathak
Senior Manager
HotWax Systems
http://www.hotwaxsystems.com

> On Jun 4, 2016, at 12:57 PM, Amardeep Singh Jhajj <am...@hotwaxsystems.com> wrote:
> 
> Hi Community,
> 
> We have recently seen many issues related to missing child block elements
> in PDF, we normally fix it by adding missing elements. Some of the tickets-
> OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>, OFBIZ-6898
> <https://issues.apache.org/jira/browse/OFBIZ-6898> etc.
> 
> Today, I found this issue again in trunk in accounting trans PDF. Please
> refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>
> 
> I also checked it in our other releases 13.07 and 14.12, it worked. So it
> was the question that what is changed after 14.12 release that causes this
> issue.
> 
> I done some research and found that we have changed the fop jar from
> fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change available in
> both the 15.12 (cut from trunk after change) and trunk.
> 
> In release 14.12, in ApacheFopWorker.java "getFactoryInstance" method, we
> have below code snippet
> 
> fopFactory.setStrictValidation(false);
> 
> Actually, XSL-FO validation is by default active. By above code, validation
> was deactivated.
> 
> On looking at commit at -r1691852, we have upgraded to fop-2.0 and removed
> the above code which deactivates validation. In 2.0, setStrictValidation
> method is not present instead we can use configuration property
> "strict-validation" with value "false". This configuration property exists
> in both the fop 1.0 and 2.0.
> 
> Please refer:
> 
> https://xmlgraphics.apache.org/fop/1.0/configuration.html
> https://xmlgraphics.apache.org/fop/2.0/configuration.html
> 
> We can disable validation using below code snippet in fop.xconf.
> 
> <strict-validation>false</strict-validation>
> 
> I am able to open PDF using it. We can say, no strict validation of markup
> done here.
> 
> But, I would prefer validation enabled as it helps us to write correct
> markup of XSL-FO. We may see similar kind of issues in future due to strict
> validation and we can fix it.
> 
> Should we do validation false or not? Please let me know your thoughts.
> 
> Thanks and Regards
> --
> Amardeep Singh Jhajj
> www.hotwaxsystems.com


Re: PDF's missing child block element errors

Posted by Mridul Pathak <mr...@hotwaxsystems.com>.
Hi Amardeep,

Thanks for bringing it up. I believe we should keep validation enabled to follow best practices and better code quality. It’s good that we are noticing these issues due to change in validation jars.

--
Thanks & Regards,
Mridul Pathak
Senior Manager
HotWax Systems
http://www.hotwaxsystems.com

> On Jun 4, 2016, at 12:57 PM, Amardeep Singh Jhajj <am...@hotwaxsystems.com> wrote:
> 
> Hi Community,
> 
> We have recently seen many issues related to missing child block elements
> in PDF, we normally fix it by adding missing elements. Some of the tickets-
> OFBIZ-7090 <https://issues.apache.org/jira/browse/OFBIZ-7090>, OFBIZ-6898
> <https://issues.apache.org/jira/browse/OFBIZ-6898> etc.
> 
> Today, I found this issue again in trunk in accounting trans PDF. Please
> refer OFBIZ-7171 <https://issues.apache.org/jira/browse/OFBIZ-7171>
> 
> I also checked it in our other releases 13.07 and 14.12, it worked. So it
> was the question that what is changed after 14.12 release that causes this
> issue.
> 
> I done some research and found that we have changed the fop jar from
> fop-1.1.jar to fop-2.0.jar at -r1691852 in trunk, now change available in
> both the 15.12 (cut from trunk after change) and trunk.
> 
> In release 14.12, in ApacheFopWorker.java "getFactoryInstance" method, we
> have below code snippet
> 
> fopFactory.setStrictValidation(false);
> 
> Actually, XSL-FO validation is by default active. By above code, validation
> was deactivated.
> 
> On looking at commit at -r1691852, we have upgraded to fop-2.0 and removed
> the above code which deactivates validation. In 2.0, setStrictValidation
> method is not present instead we can use configuration property
> "strict-validation" with value "false". This configuration property exists
> in both the fop 1.0 and 2.0.
> 
> Please refer:
> 
> https://xmlgraphics.apache.org/fop/1.0/configuration.html
> https://xmlgraphics.apache.org/fop/2.0/configuration.html
> 
> We can disable validation using below code snippet in fop.xconf.
> 
> <strict-validation>false</strict-validation>
> 
> I am able to open PDF using it. We can say, no strict validation of markup
> done here.
> 
> But, I would prefer validation enabled as it helps us to write correct
> markup of XSL-FO. We may see similar kind of issues in future due to strict
> validation and we can fix it.
> 
> Should we do validation false or not? Please let me know your thoughts.
> 
> Thanks and Regards
> --
> Amardeep Singh Jhajj
> www.hotwaxsystems.com