Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


ok, must be doing something stupid but HELP (XSL problem)

From: Gina_Marano <ginalster@-----.--->
To: NULL
Date: 3/12/2009 9:08:00 AM
XSL:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
xmlns:jdf="http://www.CIP4.org/JDFSchema_1_1">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/
>
	<xsl:template match="/">
		<Order xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
			<xsl:attribute name="orderDate"><xsl:value-of select="/PrintTalk/
@timeStamp"/></xsl:attribute>
			<xsl:attribute name="OrderID"><xsl:value-of select="/PrintTalk/
Request/PurchaseOrder/@BusinessID"/></xsl:attribute>
			<xsl:attribute name="CustomerID"><xsl:value-of select="/PrintTalk/
Header/From/Credential/Identity"/></xsl:attribute>
			<xsl:element name="Address">
				<xsl:attribute name="AddressID">1</xsl:attribute>
				<firstname>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Person/@FirstName"/>
				</firstname>
				<lastname>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Person/@FamilyName"/>
				</lastname>
				<address1>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Address/@Street"/>
				</address1>
				<address2>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Address/@ExtendedAddress"/>
				</address2>
				<address3>	</address3>
				<city>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Address/@City"/>
				</city>
				<state>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Address/@Region"/>
				</state>
				<postalcode>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Address/@PostalCode"/>
				</postalcode>
				<xsl:choose>
					<xsl:when test="string-length(/PrintTalk/Request/PurchaseOrder/
jdf:JDF/ResourcePool/Contact/Address/@CountryCode)>0">
						<country>
							<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Address/@CountryCode"/>
						</country>
					</xsl:when>
					<xsl:otherwise>
						<country>US</country>
					</xsl:otherwise>
				</xsl:choose>
				<phone>
					<xsl:value-of select="/PrintTalk/Request/PurchaseOrder/jdf:JDF/
ResourcePool/Contact/Person/ComChannel/@Locator"/>
				</phone>
				<email/>
			</xsl:element>
		</Order>
	</xsl:template>
</xsl:stylesheet>

XML:

<?xml version="1.0" encoding="UTF-8"?>
<PrintTalk xmlns="http://www.printtalk.org/schema" xmlns:jdf="http://
www.CIP4.org/JDFSchema_1_1" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" payloadID="2008-02-21T11:08:25-08:00.XYZ-
STR-350047@x..." timeStamp="2008-02-21T11:08:25-08:00"
version="1.1" xsi:schemaLocation="http://www.printtalk.org/schema
http://www.printtalk.org/schema/printTalk_1_1.xsd">
	<Header>
		<From>
			<Credential domain="xyz.com">
				<Identity>Xyz</Identity>
			</Credential>
		</From>
		<To>
			<Credential domain="prninter.com">
				<Identity>orders@p...</Identity>
			</Credential>
		</To>
		<Sender>
			<Credential domain="xyz.com">
				<Identity>Xyz</Identity>
				<SharedSecret>XXXXXXXXX</SharedSecret>
			</Credential>
			<UserAgent>Xyz serve 1.9</UserAgent>
		</Sender>
	</Header>
	<Request>
		<PurchaseOrder AgentDisplayName="Xyz serve 1.3" AgentID="Xyz1.0"
BusinessID="XYZ-STR-350047" Currency="USD"
Expires="2008-05-21T12:08:25-07:00"
RequestDate="2008-02-21T11:08:25-08:00">
			<jdf:JDF ID="JDF-Root" JobID="job-XYZ-STR-350047" Status="Waiting"
Type="Product-STANDARD">
				<CustomerInfo CustomerID="Customer1">
					<ContactRef rRef="Contact1"/>
				</CustomerInfo>
				<ResourceLinkPool>
					<DeliveryIntentLink Usage="Input" rRef="Delivery1"/>
				</ResourceLinkPool>
				<ResourcePool>
					<Contact Class="Parameter" ContactTypes="Billing" ID="Contact1"
Status="Available">
						<Address City="Northpole" CountryCode="US" ExtendedAddress=""
PostalCode="99548" Region="AK" Street="156 Abby Ave"/>
						<Person FamilyName="" FirstName="Jane Doe">
							<ComChannel ChannelType="Phone" Locator="5555551212"/>
							<ComChannel ChannelType="Email" Locator=""/>
						</Person>
					</Contact>
					<Contact Class="Parameter" ContactTypes="Shipping" ID="Contact2"
Status="Available">
						<Address City="Northpole" CountryCode="US" ExtendedAddress=""
PostalCode="99548" Region="AK" Street="156 Abby Ave"/>
						<Person FamilyName="" FirstName="Jane Doe">
							<ComChannel ChannelType="Phone" Locator="5555551212"/>
							<ComChannel ChannelType="Email" Locator=""/>
						</Person>
					</Contact>
					<DeliveryIntent Class="Intent" ID="Delivery1" Status="Available">
						<Method DataType="NameSpan" Preferred="UPS Ground"/>
						<DropIntent>
							<ContactRef rRef="Contact2"/>
							<DropItemIntent Amount="1" Unit="ea">
								<ComponentRef rRef="item-P-1234"/>
							</DropItemIntent>
						</DropIntent>
					</DeliveryIntent>
				</ResourcePool>
				<JDF DescriptiveName="jacket-P-1234" ID="jdf-jacket-P-1234"
JobPartID="job-jacket-P-1234" Status="Waiting" Type="Product">
					<ResourceLinkPool>
						<ComponentLink rRef="jacket-P-1234"/>
						<ColorIntentLink rRef="color-jacket-P-1234"/>
						<MediaIntentLink rRef="media-jacket-P-1234"/>
						<ArtDeliveryIntentLink rRef="art-jacket-P-1234"/>
					</ResourceLinkPool>
					<ResourcePool>
						<Component Amount="1" Class="Quantity" DescriptiveName="jacket-
P-1234" ID="jacket-P-1234" Status="Unavailable"/>
						<ColorIntent Class="Intent" ID="color-jacket-P-1234"
Status="Available">
							<ColorStandard DataType="NameSpan" Preferred="CMYK"/>
						</ColorIntent>
						<MediaIntent Class="Intent" ID="media-jacket-P-1234"
Status="Available">
							<StockType DataType="NameSpan" Preferred="Bond">
								<MediaColor DataType="EnumerationSpan" Preferred="white"/>
								<USWeight DataType="NumberSpan" Preferred="100"/>
								<Grade DataType="IntegerSpan" Preferred="1"/>
							</StockType>
						</MediaIntent>
						<ArtDeliveryIntent Class="Intent" ID="art-jacket-P-1234"
Status="Available">
							<ArtDelivery ArtDeliveryType="DigitalNetwork"/>
							<RunList>
								<LayoutElement>
									<FileSpec FileSize="1478254" FileVersion="1" URL="http://
serve.xyz.com/cache/P201201/hardcover.prninter/P201201_d.pdf"/>
								</LayoutElement>
							</RunList>
						</ArtDeliveryIntent>
					</ResourcePool>
				</JDF>
				<JDF DescriptiveName="text-P-1234" ID="jdf-text-P-1234"
JobPartID="job-text-P-1234" Status="Waiting" Type="Product">
					<ResourceLinkPool>
						<ComponentLink rRef="text-P-1234"/>
						<ColorIntentLink rRef="color-text-P-1234"/>
						<MediaIntentLink rRef="media-text-P-1234"/>
						<ArtDeliveryIntentLink rRef="art-text-P-1234"/>
					</ResourceLinkPool>
					<ResourcePool>
						<Component Amount="1" Class="Quantity" DescriptiveName="text-
P-1234" ID="text-P-1234" Status="Unavailable"/>
						<ColorIntent Class="Intent" ID="color-text-P-1234"
Status="Available">
							<ColorStandard DataType="NameSpan" Preferred="CMYK"/>
						</ColorIntent>
						<MediaIntent Class="Intent" ID="media-text-P-1234"
Status="Available">
							<StockType DataType="NameSpan" Preferred="Bond">
								<MediaColor DataType="EnumerationSpan" Preferred="white"/>
								<USWeight DataType="NumberSpan" Preferred="80"/>
								<Grade DataType="IntegerSpan" Preferred="2"/>
							</StockType>
						</MediaIntent>
						<ArtDeliveryIntent Class="Intent" ID="art-text-P-1234"
Status="Available">
							<ArtDelivery ArtDeliveryType="DigitalNetwork"/>
							<RunList>
								<LayoutElement>
									<FileSpec FileSize="65370566" FileVersion="1" URL="http://
serve.xyz.com/cache/P201201/hardcover.prninter/P201201_t.pdf"/>
								</LayoutElement>
							</RunList>
						</ArtDeliveryIntent>
					</ResourcePool>
				</JDF>
				<JDF DescriptiveName="book-P-1234" ID="jdf-P-1234" JobPartID="job-
P-1234" Status="Waiting" Type="Product">
					<ResourceLinkPool>
						<ComponentLink Usage="Output" rRef="item-P-1234"/>
						<ComponentLink Usage="Input" rRef="jacket-P-1234"/>
						<ComponentLink Usage="Input" rRef="text-P-1234"/>
						<BindingIntentLink rRef="bind-P-1234"/>
						<SizeIntentLink rRef="size-P-1234"/>
					</ResourceLinkPool>
					<ResourcePool>
						<Component Amount="1" Class="Quantity" DescriptiveName="the car
book" ID="item-P-1234" Status="Unavailable"/>
						<BindingIntent BindingOrder="Collecting" Class="Intent" ID="bind-
P-1234" Status="Available">
							<BindingType DataType="EnumerationSpan" Preferred="7x7-
hardcover"/>
							<HardCoverBinding>
								<Jacket DataType="EnumerationSpan" Preferred="Loose"/>
							</HardCoverBinding>
							<SpineWidth/>
						</BindingIntent>
						<SizeIntent Class="Intent" ID="size-P-1234" Status="Available">
							<Dimensions DataType="NumberSpan" Preferred="495 477"
Range="485 467~505 487"/>
							<Pages DataType="IntegerSpan" Preferred="60"/>
						</SizeIntent>
					</ResourcePool>
				</JDF>
			</jdf:JDF>
		</PurchaseOrder>
	</Request>
</PrintTalk>

Thanks much!

~Gina_M~


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent