XSLT Processor Format Output Problem

classic Classic list List threaded Threaded
3 messages Options
hcr
Reply | Threaded
Open this post in threaded view
|

XSLT Processor Format Output Problem

hcr
Hi.
   I have a problem with XSLT Processor. In mine case, I want to serializer DOM from XSLT Processor. The code is like that:
    <p:processor name="oxf:xslt">
        <p:input name="data">
            <tmp/>
        </p:input>   
        <p:input name="config">
            <form xsl:version="2.0">
                <name>china</name>
                <age>5000</age>
            </form>
        </p:input>   
        <p:output name="data" id="src"/>
    </p:processor>   
    <p:processor name="oxf:url-serializer">
        <p:input name="config">
            <config>
                <url>oxf:/common/simple-owl.xml</url>
            </config>
        </p:input>
        <p:input name="data" href="#src"/>
    </p:processor>
 
     The simple-owl.xml content is like that:
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:justep="http://www.justep.com/ops/processors" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:win="<A href='http://www.justep.com/display/window">china2000http://www.justep.com/display/window"><name>china</name><age>2000</age></form>
  
    The format is not right. I want to receive simple-owl.xml is that:
<form xmlns:justep="http://www.justep.com/ops/processors" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:win="<A href='http://www.justep.com/display/window">'>http://www.justep.com/display/window">
    <name>china</name>
    <age>5000</age>
</form>
 
   This is XSLT Processor format output problem, I think? How can I do it?

 
 
 
 
 



想免费获得高速稳定的3G邮箱吗? www.126.com

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: XSLT Processor Format Output Problem

Ryan Puddephatt
Hi,
    There are two ways to do this,
 
1. change your xsl to use xsl:stylesheet and add <xsl:output indent="yes"/>
 
2. add <indent-amount>4</indent-amount> to the config of the url-serializer
 
Ryan
 

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


From: hechengrong [mailto:[hidden email]]
Sent: 04 January 2007 09:23
To: [hidden email]
Subject: [ops-users] XSLT Processor Format Output Problem

Hi.
   I have a problem with XSLT Processor. In mine case, I want to serializer DOM from XSLT Processor. The code is like that:
    <p:processor name="oxf:xslt">
        <p:input name="data">
            <tmp/>
        </p:input>   
        <p:input name="config">
            <form xsl:version="2.0">
                <name>china</name>
                <age>5000</age>
            </form>
        </p:input>   
        <p:output name="data" id="src"/>
    </p:processor>   
    <p:processor name="oxf:url-serializer">
        <p:input name="config">
            <config>
                <url>oxf:/common/simple-owl.xml</url>
            </config>
        </p:input>
        <p:input name="data" href="#src"/>
    </p:processor>
 
     The simple-owl.xml content is like that:
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:justep="http://www.justep.com/ops/processors" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:win="<A href='http://www.justep.com/display/window">china2000http://www.justep.com/display/window"><name>china</name><age>2000</age></form>
  
    The format is not right. I want to receive simple-owl.xml is that:
<form xmlns:justep="http://www.justep.com/ops/processors" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:win="<A href='http://www.justep.com/display/window">'>http://www.justep.com/display/window">
    <name>china</name>
    <age>5000</age>
</form>
 
   This is XSLT Processor format output problem, I think? How can I do it?

 
 
 
 
 



想免费获得高速稳定的3G邮箱吗? www.126.com


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
hcr
Reply | Threaded
Open this post in threaded view
|

Re: RE: XSLT Processor Format Output Problem

hcr
Hi Ryan.
   Thank you for your response. I test second solution. This didn't work well. Then I have found another solution: use xml-converter processor and file-serializer processor.
 
 
 
 
在2007-01-04,"Ryan Puddephatt" <[hidden email]> 写道:
Hi,
    There are two ways to do this,
 
1. change your xsl to use xsl:stylesheet and add <xsl:output indent="yes"/>
 
2. add <indent-amount>4</indent-amount> to the config of the url-serializer
 
Ryan
 

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

 


From: hechengrong [mailto:[hidden email]]
Sent: 04 January 2007 09:23
To: [hidden email]
Subject: [ops-users] XSLT Processor Format Output Problem

Hi.
   I have a problem with XSLT Processor. In mine case, I want to serializer DOM from XSLT Processor. The code is like that:
    <p:processor name="oxf:xslt">
        <p:input name="data">
            <tmp/>
        </p:input>   
        <p:input name="config">
            <form xsl:version="2.0">
                <name>china</name>
                <age>5000</age>
            </form>
        </p:input>   
        <p:output name="data" id="src"/>
    </p:processor>   
    <p:processor name="oxf:url-serializer">
        <p:input name="config">
            <config>
                <url>oxf:/common/simple-owl.xml</url>
            </config>
        </p:input>
        <p:input name="data" href="#src"/>
    </p:processor>
 
     The simple-owl.xml content is like that:
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:justep="http://www.justep.com/ops/processors" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:win="<A href='http://www.justep.com/display/window">china2000http://www.justep.com/display/window"><name>china</name><age>2000</age></form>
  
    The format is not right. I want to receive simple-owl.xml is that:
<form xmlns:justep="http://www.justep.com/ops/processors" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:win="<A href='http://www.justep.com/display/window">'>http://www.justep.com/display/window">
    <name>china</name>
    <age>5000</age>
</form>
 
   This is XSLT Processor format output problem, I think? How can I do it?

 
 
 
 
 



想免费获得高速稳定的3G邮箱吗? www.126.com



想免费获得高速稳定的3G邮箱吗? www.126.com

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws