My project needs to be able to reference a field in a parent group in a repeating section of the child group. Here's the setup. I've labeled each location: AB and C are for my own testing purposes. D is the one that actually needs to print. A is the only one that actually will print. The confusing part is that the 'for-each-check' group loops on each Q_P58W1, of which P58WCHCK is a member, but it only prints outside that grouping.
For the record, that code right after each for-each group is not there in the actual document, I just pasted it there to make it clear how the grouping structure works.
Here is a copy of the xml I'm working with (edited to remove sensitive info):
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Oracle BI Publisher 12.2.1.3.0 -Dataengine, datamodel:_ICIM_DM_P58R01_DM_xdm -->
<DATA_DS><P_JNO_IN>271720364</P_JNO_IN>
<Q_A01F>
<A01SEQ>1</A01SEQ><VOID_LINE1>VOID VOID VOID VOID VOID</VOID_LINE1><VOID_LINE2> VOID VOID VOID VOID</VOID_LINE2><LOCATION_IN>0005</LOCATION_IN><AHL1>03</AHL1><ACCOUNT_IN>290</ACCOUNT_IN>
<Q_P58W1>
<P58WCHCK>09077475</P58WCHCK>
<G_1>
<P58WVENNO>93373</P58WVENNO><P58WNAME1>FASTSIGNS</P58WNAME1><P58WADR1></P58WADR1><P58WCSZ></P58WCSZ><P58WPAYN>$12.00</P58WPAYN><P58WPAYW1>Twelve Dollars and 00 Cents*****</P58WPAYW1><P58WGAMT>12</P58WGAMT><P58WDAMT>0</P58WDAMT><P58WNAMT>12</P58WNAMT><P58WCDATE>11 21 19</P58WCDATE><C_PRT_CHK></C_PRT_CHK><PAY_WORDS1>Twelve Dollars and 00 Cents*****</PAY_WORDS1><ADR_LINE1>FASTSIGNS</ADR_LINE1><ADR_LINE3></ADR_LINE3><ADR_LINE6></ADR_LINE6><ACCOUNT_NAME></ACCOUNT_NAME><COUNTRY></COUNTRY><ADDRESS1></ADDRESS1><ADDRESS2></ADDRESS2><ADDRESS3>VOID VOID VOID</ADDRESS3><CITY></CITY><STATE></STATE><ZIP></ZIP><DUMMY_FLAG>DUMMY</DUMMY_FLAG><LOGO_FLAG></LOGO_FLAG><ADR_LINES>FASTSIGNS
</ADR_LINES>
<Q_P58W2>
<P58WINVNO>12</P58WINVNO><P58WVOUCH>637866</P58WVOUCH><P58WIDATE>2019-11-22T00:00:00.000-06:00</P58WIDATE><P58WGAMT>12</P58WGAMT><P58WDAMT>0</P58WDAMT><P58WNAMT>12</P58WNAMT><C_PRT_DATE>11/22/19</C_PRT_DATE>
</Q_P58W2>
<C_PRT_PAY_TOT>$12.00</C_PRT_PAY_TOT>
<CS_NUM_VOUCHERS>1</CS_NUM_VOUCHERS>
</G_1>
<G_1>
<P58WVENNO>93373</P58WVENNO><P58WNAME1>FASTSIGNS</P58WNAME1><P58WADR1></P58WADR1><P58WCSZ></P58WCSZ><P58WPAYN>$12.00</P58WPAYN><P58WPAYW1>Twelve Dollars and 00 Cents*****</P58WPAYW1><P58WGAMT>12</P58WGAMT><P58WDAMT>0</P58WDAMT><P58WNAMT>12</P58WNAMT><P58WCDATE>11 21 19</P58WCDATE><C_PRT_CHK></C_PRT_CHK><PAY_WORDS1>Twelve Dollars and 00 Cents*****</PAY_WORDS1><ADR_LINE1>FASTSIGNS</ADR_LINE1><ADR_LINE3></ADR_LINE3><ADR_LINE6></ADR_LINE6><ACCOUNT_NAME></ACCOUNT_NAME><ACCOUNT_NUMBER></ACCOUNT_NUMBER><ROUTING_NUMBER></ROUTING_NUMBER><COUNTRY></COUNTRY><ADDRESS1></ADDRESS1><ADDRESS2></ADDRESS2><ADDRESS3>VOID VOID VOID</ADDRESS3><CITY></CITY><STATE></STATE><ZIP></ZIP><DUMMY_FLAG>NORMAL</DUMMY_FLAG><LOGO_FLAG></LOGO_FLAG><ADR_LINES>FASTSIGNS
</ADR_LINES>
<Q_P58W2>
<P58WINVNO>12</P58WINVNO><P58WVOUCH>637866</P58WVOUCH><P58WIDATE>2019-11-22T00:00:00.000-06:00</P58WIDATE><P58WGAMT>12</P58WGAMT><P58WDAMT>0</P58WDAMT><P58WNAMT>12</P58WNAMT><C_PRT_DATE>11/22/19</C_PRT_DATE>
</Q_P58W2>
<C_PRT_PAY_TOT>$12.00</C_PRT_PAY_TOT>
<CS_NUM_VOUCHERS>1</CS_NUM_VOUCHERS>
</G_1>
</Q_P58W1>
</Q_A01F>
<CF_PROPERTIES>
<REPORT_NAME>P58R01</REPORT_NAME><REPORT_DESCRIPTION>Check Print And Update</REPORT_DESCRIPTION><VERSION_NUMBER>V11.0.001</VERSION_NUMBER><DATABASE_NAME>DEV</DATABASE_NAME><USER_NAME></USER_NAME><RUN_DATE>2019-11-22T10:39:20.000-06:00</RUN_DATE>
</CF_PROPERTIES>
</DATA_DS>
I found an answer to this after a bit more looking around. The element I wanted to include in the child group - Q_P58W1/P58WCHCK - refused to print inside the <?for-each:G_1?>
loop, so I just changed my BI Publisher data model so that the query selected the check number twice, as two different elements with different aliases. One of those, P58WCHCK, remained as the single element grouped under Q_P58W1 since that was a required functionality. The other just became a part of each row of the child group. Here's a screenshot of the data model box for clarity.