saxon

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

saxon

Colin Seaman
Hi,

I having a problem running the saxon:parse function to convert a string
to XML.  Here's my .xsl file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://saxon.sf.net/">
  <xsl:template match="/">
  <xsl:copy-of select="saxon:parse(/request/parameters/parameter/value)"/>
  </xsl:template>
  </xsl:stylesheet>

I get the error:

A pseudo attribute name is expected.

Has anyone else successfully used this function?

--
Colin Seaman
Senior Developer
 
Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email in
error please contact Tradocs. Please note that any views or
opinions presented in this email are solely those of the author
and do not necessarily represent those of the company. Finally,
the recipient should check this email and any attachments for
the presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
This content of this email is without prejudice.




--
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: saxon

Ryan Puddephatt
Colin,
        I've successfully used this, without a problem. I notice your
getting your data from the request, have you tried debugging the request to
see that its correct?

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

 

>-----Original Message-----
>From: Colin Seaman [mailto:[hidden email]]
>Sent: 27 November 2006 11:41
>To: [hidden email]
>Subject: [ops-users] saxon
>
>Hi,
>
>I having a problem running the saxon:parse function to convert
>a string to XML.  Here's my .xsl file:
>
><?xml version="1.0" encoding="UTF-8"?>
><xsl:stylesheet version="2.0"
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>xmlns:saxon="http://saxon.sf.net/">
>  <xsl:template match="/">
>  <xsl:copy-of
>select="saxon:parse(/request/parameters/parameter/value)"/>
>  </xsl:template>
>  </xsl:stylesheet>
>
>I get the error:
>
>A pseudo attribute name is expected.
>
>Has anyone else successfully used this function?
>
>--
>Colin Seaman
>Senior Developer
>
>Tradocs Ltd,
>Tower Point,
>44 North Road,
>Brighton,
>BN1 1YR
>
>email:     [hidden email]
>skype:     colin,seaman
>telephone: 0870-1417031
>website:   http://www.tradocs.net
>
>This email and any files transmitted with it are confidential
>and intended solely for the use of the individual or entity to
>whom they are addressed. If you have received this email in
>error please contact Tradocs. Please note that any views or
>opinions presented in this email are solely those of the
>author and do not necessarily represent those of the company.
>Finally, the recipient should check this email and any
>attachments for the presence of viruses. The company accepts
>no liability for any damage caused by any virus transmitted by
>this email.
>This content of this email is without prejudice.
>
>
>



--
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: saxon

fl.schmitt
In reply to this post by Colin Seaman
Hi Colin,

> Has anyone else successfully used this function?

I'm not sure about the error message, but provided that you want to parse the content of the value node, the following works:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/">
<xsl:template match="/">
  <test>
  <xsl:apply-templates />
  </test>
  </xsl:template>
<xsl:template match="/request/parameters/parameter/value/*">
   <xsl:copy-of select="saxon:parse(.)" />
</xsl:template>
</xsl:stylesheet>

But i'm not a XPath expert, there may be more elegant solutions.


Florian

--
http://www.florian-schmitt.net




--
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: saxon

Colin Seaman
In reply to this post by Ryan Puddephatt
Hi,

The data coming in is a line of XML, ie:

<?xml version="1.0" encoding="UTF-8"><Document><DHeader><documenttype>asdas</documenttype></DHeader></Document>

(The parameter/name is "xml")

Should I serialize this first?

My pipeline looks like:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
<p:param name="instance" type="input"/>
<p:param name="data" type="output"/>
    
  <p:processor name="oxf:request">
       <p:input name="config" >
            <config>
                <include>/request/parameters/parameter[starts-with(name, 'xml')]</include>
            </config>
        </p:input>
        <p:output name="data" id="data123"/>
  </p:processor>
 
<p:processor name="oxf:xslt" xmlns:p="http://www.orbeon.com/oxf/pipeline">

<p:input name="config" href="transform.xsl"/>
  <p:input name="data" href="#data123"/>
  <p:output name="data" ref="data" />
  </p:processor>

</p:config>
Colin Seaman
Senior Developer
 
Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.
This content of this email is without prejudice.


Ryan Puddephatt wrote:
Colin,
	I've successfully used this, without a problem. I notice your
getting your data from the request, have you tried debugging the request to
see that its correct?

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

 

  
-----Original Message-----
From: Colin Seaman [[hidden email]] 
Sent: 27 November 2006 11:41
To: [hidden email]
Subject: [ops-users] saxon

Hi,

I having a problem running the saxon:parse function to convert 
a string to XML.  Here's my .xsl file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:saxon="http://saxon.sf.net/">
 <xsl:template match="/">
 <xsl:copy-of 
select="saxon:parse(/request/parameters/parameter/value)"/>
 </xsl:template>
 </xsl:stylesheet>

I get the error:

A pseudo attribute name is expected.

Has anyone else successfully used this function?

--
Colin Seaman
Senior Developer

Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company. 
Finally, the recipient should check this email and any 
attachments for the presence of viruses. The company accepts 
no liability for any damage caused by any virus transmitted by 
this email.
This content of this email is without prejudice.



    


  

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


--
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: saxon

Ryan Puddephatt
Colin
 
Your XML declaration is incorrect
 
<?xml version="1.0" encoding="UTF-8">
 
should be
 
<?xml version="1.0" encoding="UTF-8"?>
 
This will work, the error message isn't very helpful, but a google search showed other people with similar problems :-)
 
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: Colin Seaman [mailto:[hidden email]]
Sent: 27 November 2006 12:28
To: [hidden email]
Subject: Re: [ops-users] saxon

Hi,

The data coming in is a line of XML, ie:

<?xml version="1.0" encoding="UTF-8"><Document><DHeader><documenttype>asdas</documenttype></DHeader></Document>

(The parameter/name is "xml")

Should I serialize this first?

My pipeline looks like:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
<p:param name="instance" type="input"/>
<p:param name="data" type="output"/>
    
  <p:processor name="oxf:request">
       <p:input name="config" >
            <config>
                <include>/request/parameters/parameter[starts-with(name, 'xml')]</include>
            </config>
        </p:input>
        <p:output name="data" id="data123"/>
  </p:processor>
 
<p:processor name="oxf:xslt" xmlns:p="http://www.orbeon.com/oxf/pipeline">

<p:input name="config" href="transform.xsl"/>
  <p:input name="data" href="#data123"/>
  <p:output name="data" ref="data" />
  </p:processor>

</p:config>
Colin Seaman
Senior Developer
 
Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.
This content of this email is without prejudice.


Ryan Puddephatt wrote:
Colin,
	I've successfully used this, without a problem. I notice your
getting your data from the request, have you tried debugging the request to
see that its correct?

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

 

  
-----Original Message-----
From: Colin Seaman [[hidden email]] 
Sent: 27 November 2006 11:41
To: [hidden email]
Subject: [ops-users] saxon

Hi,

I having a problem running the saxon:parse function to convert 
a string to XML.  Here's my .xsl file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:saxon="http://saxon.sf.net/">
 <xsl:template match="/">
 <xsl:copy-of 
select="saxon:parse(/request/parameters/parameter/value)"/>
 </xsl:template>
 </xsl:stylesheet>

I get the error:

A pseudo attribute name is expected.

Has anyone else successfully used this function?

--
Colin Seaman
Senior Developer

Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company. 
Finally, the recipient should check this email and any 
attachments for the presence of viruses. The company accepts 
no liability for any damage caused by any virus transmitted by 
this email.
This content of this email is without prejudice.



    


  

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


--
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: saxon

Colin Seaman
ahh, blimey, it's always the little things! :-)

Thanks very much!
Colin Seaman
Senior Developer
 
Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.
This content of this email is without prejudice.


Ryan Puddephatt wrote:
Colin
 
Your XML declaration is incorrect
 
<?xml version="1.0" encoding="UTF-8">
 
should be
 
<?xml version="1.0" encoding="UTF-8"?>
 
This will work, the error message isn't very helpful, but a google search showed other people with similar problems :-)
 
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: Colin Seaman [[hidden email]]
Sent: 27 November 2006 12:28
To: [hidden email]
Subject: Re: [ops-users] saxon

Hi,

The data coming in is a line of XML, ie:

<?xml version="1.0" encoding="UTF-8"><Document><DHeader><documenttype>asdas</documenttype></DHeader></Document>

(The parameter/name is "xml")

Should I serialize this first?

My pipeline looks like:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
<p:param name="instance" type="input"/>
<p:param name="data" type="output"/>
    
  <p:processor name="oxf:request">
       <p:input name="config" >
            <config>
                <include>/request/parameters/parameter[starts-with(name, 'xml')]</include>
            </config>
        </p:input>
        <p:output name="data" id="data123"/>
  </p:processor>
 
<p:processor name="oxf:xslt" xmlns:p="http://www.orbeon.com/oxf/pipeline">

<p:input name="config" href="transform.xsl"/>
  <p:input name="data" href="#data123"/>
  <p:output name="data" ref="data" />
  </p:processor>

</p:config>
Colin Seaman
Senior Developer
 
Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the author 
and do not necessarily represent those of the company. Finally, 
the recipient should check this email and any attachments for 
the presence of viruses. The company accepts no liability for 
any damage caused by any virus transmitted by this email.
This content of this email is without prejudice.


Ryan Puddephatt wrote:
Colin,
	I've successfully used this, without a problem. I notice your
getting your data from the request, have you tried debugging the request to
see that its correct?

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

 

  
-----Original Message-----
From: Colin Seaman [[hidden email]] 
Sent: 27 November 2006 11:41
To: [hidden email]
Subject: [ops-users] saxon

Hi,

I having a problem running the saxon:parse function to convert 
a string to XML.  Here's my .xsl file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:saxon="http://saxon.sf.net/">
 <xsl:template match="/">
 <xsl:copy-of 
select="saxon:parse(/request/parameters/parameter/value)"/>
 </xsl:template>
 </xsl:stylesheet>

I get the error:

A pseudo attribute name is expected.

Has anyone else successfully used this function?

--
Colin Seaman
Senior Developer

Tradocs Ltd,
Tower Point,
44 North Road,
Brighton,
BN1 1YR

email:     [hidden email]
skype:     colin,seaman
telephone: 0870-1417031
website:   http://www.tradocs.net

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity to 
whom they are addressed. If you have received this email in 
error please contact Tradocs. Please note that any views or 
opinions presented in this email are solely those of the 
author and do not necessarily represent those of the company. 
Finally, the recipient should check this email and any 
attachments for the presence of viruses. The company accepts 
no liability for any damage caused by any virus transmitted by 
this email.
This content of this email is without prejudice.



    


  

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


--
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