[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

how to get Output in XML format with no tags

Subject: how to get Output in XML format with no tags
From: "Manisha Gore" <manishakulkarni@xxxxxxxxxxx>
Date: Mon, 06 Mar 2006 15:06:43 -0800
xsl value of select format
Hello,

I am new to XSLT technology and being thrown to develop something real quick. I need to come up with xslt stylesheet format which will generate XML file in format below. Basically the output format does not have tags. can someone help me come up with xslt fiel format for the same? The values which are in quotation marks are going to be fed by database.

<RPSL_PTNR
ptnr_id="31942"
ptnr_type="SHIP_TO"
sub_org="NGEN"
app_id="TPRPL_100"
name_1="Unisys Corp."
address_1="350 SOUTH 5TH"
address_2="ROOM 127"
address_3=""
address_4=""
address_5=""
city="MINNEAPOLIS"
state_name="MN"
state_code="MN"
postal_code="55415"
ctry_name="United States"
ctry_code="US"
created_by="JBRYANT"
request_url="https://testxmlfulfill.networkgeneral.com/normal/oraapps/dev/ReceiveVastraXML"
use_cached_result="FALSE"
persist="TRUE"
user_varchar1="2009794"
user_varchar2="125685"
user_varchar3=""/>


I have created somethign like below but it is not working and giving me error when I do XMLTRANSFORM. The message I get is "inconsistent datatypes: expected - got -"

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- -->
<!-- Template Output is XML -->
<!-- -->
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="RPSL_PTNR">
<!--- BEGIN PARTNER -->
<xsl:attribute name="ptnr_id=">
<xsl:value-of select="/ORDER/CUSTOERM_NUMBER"/>
</xsl:attribute>
<xsl:attribute name="ptnr_type=">
<xsl:value-of select="/ORDER/SITE_USE"/>
</xsl:attribute>
<xsl:attribute name="sub_org=">
<xsl:value-of select="/ORDER/SUB_ORG"/>
</xsl:attribute>
<xsl:attribute name="app_id=">
<xsl:value-of select="/ORDER/APP_ID"/>
</xsl:attribute>
<xsl:attribute name="name_1=">
<xsl:value-of select="/ORDER/CUST_NAME"/>
</xsl:attribute>
<xsl:attribute name="address_1=">
<xsl:value-of select="/ORDER/ADDRESS_1"/>
</xsl:attribute>
<xsl:attribute name="address_2=">
<xsl:value-of select="/ORDER/ADDRESS_2"/>
</xsl:attribute>
<xsl:attribute name="address_3=">
<xsl:value-of select="/ORDER/ADDRESS_3"/>
</xsl:attribute>
<xsl:attribute name="address_4=">
<xsl:value-of select="/ORDER/ADDRESS_4"/>
</xsl:attribute>
<xsl:attribute name="address_5=">
<xsl:value-of select="/ORDER/ADDRESS_5"/>
</xsl:attribute>
<xsl:attribute name="city=">
<xsl:value-of select="/ORDER/CITY"/>
</xsl:attribute>
<xsl:attribute name="state_name=">
<xsl:value-of select="/ORDER/STATE_NAME"/>
</xsl:attribute>
<xsl:attribute name="state_code=">
<xsl:value-of select="/ORDER/STATE_CODE"/>
</xsl:attribute>
<xsl:attribute name="postal_code=">
<xsl:value-of select="/ORDER/POSTAL_CODE"/>
</xsl:attribute>
<xsl:attribute name="ctry_name=">
<xsl:value-of select="/ORDER/CTRY_NAME"/>
</xsl:attribute>
<xsl:attribute name="ctry_code=">
<xsl:value-of select="/ORDER/CTRY_CODE"/>
</xsl:attribute>
<xsl:attribute name="created_by=">
<xsl:value-of select="/ORDER/CREATED_BY"/>
</xsl:attribute>
<xsl:attribute name="request_url=">
<xsl:value-of select="/ORDER/REQUEST_URL"/>
</xsl:attribute>
<xsl:attribute name="use_cached_result=">
<xsl:value-of select="/ORDER/USE_CACHED_RESULT"/>
</xsl:attribute>
<xsl:attribute name="persist=">
<xsl:value-of select="/ORDER/PERSIST"/>
</xsl:attribute>
<xsl:attribute name="user_varchar1=">
<xsl:value-of select="/ORDER/ORDER_NUMBER"/>
</xsl:attribute>
<xsl:attribute name="user_varchar2=">
<xsl:value-of select="/ORDER/SITE_USE_ID"/>
</xsl:attribute>
<xsl:attribute name="user_varchar3=">
<xsl:value-of select="/ORDER/USER"/>
</xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>


All help appreciated.

Thanks in advance.

Manisha

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.