Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

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.

Featured Replies

I've got a simple ( I hope) export as xml issue

Here is my current .xsl that is erroring.. My issue is Line 9.. I'm not sure how I need modify the Attribute of Pages?

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fmp="http://www.filemaker.com/fmpxmlresult" xmlns:xalan="http://xml.apache.org/xalan" version="1.0" exclude-result-prefixes="fmp xalan">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="2"/>
	<xsl:template match="/">
		<JDF xmlns="http://www.CIP4.org/JDFschema_1_1" Status="Ready" Type="ProcessGroup" Version="1.2">
			<ResourcePool>
				<RunList Class="Parameter" ID="Link1" Locked="false" PartIDKeys="Run" Status="Available">
					<xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW">
						<RunList Class="Parameter" Pages="<xsl:value-of select="fmp:COL[3]/fmp:DATA"/>" Run="1">
							<LayoutElement>
								<FileSpec URL="file://%2a.pdf"/>
							</LayoutElement>
						</RunList>
					</xsl:for-each>
				</RunList>
			</ResourcePool>
			<ResourceLinkPool>
				<RunListLink Usage="Input" rRef="Link1"/>
			</ResourceLinkPool>
		</JDF>
	</xsl:template>
</xsl:stylesheet>

 

Here is an example of what I want to see when I export..  The only real part that changes is the "Pages=" part.

<?xml version = "1.0" ?>
<JDF Status="Ready" Type="ProcessGroup" Version="1.2" xmlns="http://www.CIP4.org/JDFschema_1_1">
	<ResourcePool>
		<RunList Class="Parameter" ID="Link1" Locked="false" PartIDKeys="Run" Status="Available">
			<RunList Class="Parameter" Pages="7" Run="1">
				<LayoutElement>
					<FileSpec URL="file://%2a.pdf"/>
				</LayoutElement>
			</RunList>
			<RunList Class="Parameter" Pages="8" Run="1">
				<LayoutElement>
					<FileSpec URL="file://%2a.pdf"/>
				</LayoutElement>
			</RunList>
			<RunList Class="Parameter" Pages="9" Run="1">
				<LayoutElement>
					<FileSpec URL="file://%2a.pdf"/>
				</LayoutElement>
			</RunList>
			<RunList Class="Parameter" Pages="9" Run="1">
				<LayoutElement>
					<FileSpec URL="file://%2a.pdf"/>
				</LayoutElement>
			</RunList>
			<RunList Class="Parameter" Pages="10" Run="1">
				<LayoutElement>
					<FileSpec URL="file://%2a.pdf"/>
				</LayoutElement>
			</RunList>
			<RunList Class="Parameter" Pages="10" Run="1">
				<LayoutElement>
					<FileSpec URL="file://%2a.pdf"/>
				</LayoutElement>
			</RunList>
			<RunList Class="Parameter" Pages="0" Run="1">
				<LayoutElement>
					<FileSpec URL="file://%2a.pdf"/>
				</LayoutElement>
			</RunList>
		</RunList>
	</ResourcePool>
	<ResourceLinkPool>
		<RunListLink Usage="Input" rRef="Link1"/>
	</ResourceLinkPool>
</JDF>

 

Please also add an example: file.fmpxmlresult.xml file.

 

<xsl:template match="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW">
  <RunList Class="Parameter" Run="1">
    <xsl:attribute name="Pages">
        <xsl:value-of select="fmp:COL[3]/fmp:DATA"/>
    </xsl:attribute>
    <LayoutElement>
      <FileSpec URL="file://%2a.pdf"/>
    </LayoutElement>
  </RunList>
</xsl:template>

<RunList Class="Parameter" ID="Link1" Locked="false" PartIDKeys="Run" Status="Available">
  <xsl:apply-templates select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW"/>
</RunList>

How many records are you working with? Template usually spends less memory than for-each

Edited by ggt667

If I am guessing correctly, instead of: 

<RunList Class="Parameter" Pages="<xsl:value-of select="fmp:COL[3]/fmp:DATA"/>" Run="1">

you want to do:

<RunList Class="Parameter" Pages="{fmp:COL[3]/fmp:DATA}" Run="1">

For explanation of this syntax, see: https://www.w3.org/TR/1999/REC-xslt-19991116#attribute-value-templates

 

Alternatively, you can use the more verbose:

<RunList Class="Parameter" Run="1">
    <xsl:attribute name="Pages">
        <xsl:value-of select="fmp:COL[3]/fmp:DATA"/>
    </xsl:attribute>

 

 

  • Author

That worked..  Thanks..

and Thanks for the Link. 

 

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

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.