Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

xsl-Fo Absätze nach Element

Empfohlene Antworten

Veröffentlicht

Hallo,

ich hab das Problem, dass er bei mir keine Absätze macht!

bei xsl hatte ich diese Problem mit HTML Tags gelöst. Was er aber bei Fo nicht verarbeiten kann!

Wie könnt ich das Problem lösen?

Bei xsl sah das noch so aus:


<xsl:for-each select="content/instruction">


      <h4><xsl:number value="position()" format="1." />     

      <xsl:value-of select="exercise" /></h4>


     <xsl:for-each select="solution">

	  <p><xsl:number value="position()" format="1. "/>

	  <xsl:value-of select="."/></p>

     </xsl:for-each>	


</xsl:for-each>

Hier hat er nach jeder "solution" einen absatz gemacht! aber bei fo klappt das nicht so! Hat jemand ne Lösung wie ich das Problem angehen könnte? das ganze muss auch innerhalb eines Fo-Blocks geschehen, da nach jeder Exercise mehrere Solution kommen.... hab versucht in dem inline ein space after einzubauen aber das hat nit so gefunzt: anscheind kann man das nur im Fo:block Tag einbauen?!?

<xsl:template match="content/instruction">

  <fo:block font-family="Arial" font-size="10pt">

	<fo:inline  font-family="Arial" font-weight="bold" font-size="12pt" color="black" space-after="1em">

	        <xsl:number format="1. " />

	        <xsl:value-of select="exercise"/>

	 </fo:inline>

	 <fo:inline  font-family="Arial"  font-size="10pt" space-after="1em">

		<xsl:for-each select="solution">

		 <xsl:number format="1. " />

	         	 <xsl:value-of select="."/>

		</xsl:for-each>		

	</fo:inline>		   

 </fo:block>

</xsl:template>		

Leider macht er mir hier keinen Absatz nach jeder Solution!

hat jemand ne Lösung für mich? Wäre um jeden Tipp dankbar

Hier ist der aktuelle CODE

Als Hinweis nach jeder Exercise kommen mehrere Solution....


<xsl:template match="content/instruction">

     <fo:block font-family="Arial" font-size="10pt" space-after="1em">

	<fo:inline  font-family="Arial" font-weight="bold" font-size="12pt" space-after="1em">

		<xsl:number format="1. " />

	        <xsl:value-of select="exercise"/>

      </fo:inline>

    </fo:block>

    <fo:block space-after="1em">	 

	<fo:inline  font-family="Arial"  font-size="10pt">

		<xsl:for-each select="solution">

		   <xsl:number format="1. " />

		   <xsl:value-of select="."/>

		</xsl:for-each>		

	</fo:inline>		   

      </fo:block>

</xsl:template>			

Leider macht er mir hier keinen Absatz nach jeder Solution!

hat jemand ne Lösung für mich? Wäre um jeden Tipp dankbar

ich habs gelöst! ich muss einfach nach dem for each einen fo:block mit space after definieren!

was in etwa so aussieht:


<xsl:for-each select="solution">

    <fo:block space-after="1em"> 

        <xsl:number format="1. " />

        <xsl:value-of select="."/>

    </fo:block>

</xsl:for-each>	

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.