RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-24 Thread ROSSEL Olivier
 It will work for a textarea if that is an option, but for an 
 input, all the tags get stripped out and just the content 
 gets included.

This is a very interesting thread.
So with hidden textareas or you custom class, I can pass the XML fragment.
But when receiving the request parameter in my XSL, how can I transform it
into a XML fragment again and out put it of the transformation?
Is the noddeset() function useful in that case?

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-24 Thread Bert Van Kets
I used JTidy to parse the string and output it as a DOM stream into an XSP 
page.  This DOM stream is automatically converted to a SAX stream by Cocoon.
Regular XSLT can be performed after this.
JTidy is readily available in Cocoon.

Here's a code snip:

  try {
Tidy tidy = new Tidy();
//Do not show parsing messages
tidy.setQuiet(true);
//Do not show warnings in the Servlet Engine console
tidy.setShowWarnings(false);
//set the output type
tidy.setXmlOut(true);
//Set the encoding
tidy.setCharEncoding( conf.UTF8 );
//Set output options
tidy.setNumEntities(true);
tidy.setBreakBeforeBR(false);
tidy.setQuoteNbsp(true);
tidy.setQuoteAmpersand(true);
tidy.setLiteralAttribs(true);
//Omit the document type in the tidy output
tidy.setXmlPi(false);
//parse the document tot a DOM tree
doc =  tidy.parseDOM(in, null);
  } catch (Exception e) {
  }


Bert

At 10:06 24/10/2002 +0200, you wrote:
 It will work for a textarea if that is an option, but for an
 input, all the tags get stripped out and just the content
 gets included.

This is a very interesting thread.
So with hidden textareas or you custom class, I can pass the XML fragment.
But when receiving the request parameter in my XSL, how can I transform it
into a XML fragment again and out put it of the transformation?
Is the noddeset() function useful in that case?

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-24 Thread Antonio Gallardo Rivera
El Jueves, 24 de Octubre de 2002 02:06, ROSSEL Olivier escribió:
  It will work for a textarea if that is an option, but for an
  input, all the tags get stripped out and just the content
  gets included.

 This is a very interesting thread.
 So with hidden textareas or you custom class, I can pass the XML fragment.
 But when receiving the request parameter in my XSL, how can I transform it
 into a XML fragment again and out put it of the transformation?
 Is the noddeset() function useful in that case?

 This e-mail is intended only for the above addressee. It may contain
 privileged information. If you are not the addressee you must not copy,
 distribute, disclose or use any of the information in it. If you have
 received it in error please delete it and immediately notify the sender.

I will delete it inmediately, but before that there is a XSL list that I think 
can help better in this. :-D

The maillist is:

[EMAIL PROTECTED]

Antonio Gallardo

 Security Notice: all e-mail, sent to or from this address, may be
 accessed by someone other than the recipient, for system management and
 security reasons. This access is controlled under Regulation of
 Investigatory Powers Act 2000, Lawful Business Practises.

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-24 Thread Ryan Agler
Yes, I use that exact same technique (hidden textareas).  To get the
parameter back as XML, I wrote an XSP that grabs the request parameter
XML string, turns it into a DOM document, and then iterates through the
DOM nodes to emit corresponding SAX events.  Now my Java isn't the best
in the world, there is probably a better way, but it works for me.  

-Original Message-
From: ROSSEL Olivier [mailto:olivier.rossel;airbus.com] 
Sent: Thursday, October 24, 2002 4:06 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

 It will work for a textarea if that is an option, but for an 
 input, all the tags get stripped out and just the content 
 gets included.

This is a very interesting thread.
So with hidden textareas or you custom class, I can pass the XML
fragment.
But when receiving the request parameter in my XSL, how can I transform
it
into a XML fragment again and out put it of the transformation?
Is the noddeset() function useful in that case?

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-24 Thread Robert Koberg
Hi again,

There are a couple of ways to keep this type of thing application nuetral:

1. create a Node object and pass that into the Transform. For example:

Node root = null;
try {
  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  factory.setNamespaceAware(true);
  DocumentBuilder docbuilder = factory.newDocumentBuilder();
  org.w3c.dom.Document outNode = docbuilder.newDocument();
  root = docbuilder.parse(new InputSource(new
StringReader(restrictions.toString(;
} catch (Exception e) {
  System.out.println(e);
}

2. use something like xsl:apply-templates
select=document($get.my.string.uid)/ to retrieve the string which comes back
as a nodeset.

best,
-Rob



 -Original Message-
 From: Ryan Agler [mailto:ryanagler;hotmail.com]
 Sent: Thursday, October 24, 2002 8:11 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.


 Yes, I use that exact same technique (hidden textareas).  To get the
 parameter back as XML, I wrote an XSP that grabs the request parameter
 XML string, turns it into a DOM document, and then iterates through the
 DOM nodes to emit corresponding SAX events.  Now my Java isn't the best
 in the world, there is probably a better way, but it works for me.

 -Original Message-
 From: ROSSEL Olivier [mailto:olivier.rossel;airbus.com]
 Sent: Thursday, October 24, 2002 4:06 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

  It will work for a textarea if that is an option, but for an
  input, all the tags get stripped out and just the content
  gets included.

 This is a very interesting thread.
 So with hidden textareas or you custom class, I can pass the XML
 fragment.
 But when receiving the request parameter in my XSL, how can I transform
 it
 into a XML fragment again and out put it of the transformation?
 Is the noddeset() function useful in that case?

 This e-mail is intended only for the above addressee. It may contain
 privileged information. If you are not the addressee you must not copy,
 distribute, disclose or use any of the information in it. If you have
 received it in error please delete it and immediately notify the sender.
 Security Notice: all e-mail, sent to or from this address, may be
 accessed by someone other than the recipient, for system management and
 security reasons. This access is controlled under Regulation of
 Investigatory Powers Act 2000, Lawful Business Practises.

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: textarea in XMLForm Re: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread Dario Liberman
Just a comment:

See XML WebAccess 2.0 from www.mozquito.com
It may be interesting. I was wondering some time ago if a merge with
XMLForms from cocoon and that approach (I emphasize that I mean the
approach, not necessarily this specific implementation) of mozquito's to
have an intelligent client (with JavaScript).

If anyone had made already any simple example of this merge working please
let me know.

Best regards,
Dario.

PD: I have put both titles since they are strongly related.
In order to achieve the merge you need the textarea patch and Dom
representation of the form instead of javabeans (helpful for quick  dirty
solutions like this) and the ability to pass an XML fragment via HTML form.



- Original Message -
From: Emmanuil Batsis (Manos) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 23, 2002 06:44
Subject: Re: [Off-topic:XSLT] Passing an XML fragment via a HTML form.


 ROSSEL Olivier wrote:
 I need to pass a subtree of that XML as a parameter, via that form.
 
 Is there a way, in XSLT, to transform a XML fragment into a string?
 So I can have an input in my form that contains the text
 
 of this XML
 
 fragment.
 
 How about parsing the form element value to a DOM object
 (either client
 or server side) and extract the DOM node that serves as the
 root of the
 fragment you need?
 
 
  You think I should use Java/XSP for such a process?

 Ideally, before submission, you parse the form value to a DOM object via
 Javascript (easy in both IE and Moz). You then locate the node
 (fragment) of choice and use it's text serialization (XML) to replace
 the earlier value of the form. Your server will thus get only the
 fragment you need and get away with less work.


 Manos


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]


- Original Message -
From: Geoff Howard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 23, 2002 10:12
Subject: Re: textarea in XMLForm


 The dev list is a better place to discuss submitting
 patches.  I've cc'd this reply there as well.

 Geoff Howard

 --- Robert Ellis Parrott [EMAIL PROTECTED]
 wrote:
 
  I noticed that in the XMLForm example that one could
  not hit return and
  have a multiline message in the additional notes
  textarea. Looking into
  it, and working on related things in which I need a
  textarea, I see that
  the xmlform2html.xsl converts xf:textarea to an
  input field, and not a
  true textarea. I don't think that this is correct;
  without the style
  attribute it defaults to a textbox.
 
  The below mods to xmlform2html.xsl replace the
  textarea template with one
  that actually creates a real textarea.
 
   I think that this is the right thing to do here.
 
  rob
 
  PS: I've modified the Form class to now support
  basic Maps as well as DOM
  and Beans; I think that having this modification
  would be very helpful for
  quick  dirty solutions, and for in-development
  projects, because one can
  get data from an XMLForm into the map without
  creating nodes or a javabean
  ahead of time.
 
  Are you interested in patches?
 
 
 
  !--
 xsl:template match=xf:textarea
input name={@ref} type=textarea
  value={xf:value/text()}
  xsl:copy-of
  select=@*[not(name()='ref')]/
  xsl:apply-templates select=xf:hint/
/input
 /xsl:template
  --
 
 xsl:template match=xf:textarea
textarea name={@ref} 
  xsl:copy-of
  select=@*[not(name()='ref')]/
  xsl:value-of select=xf:value/text()/
  xsl:apply-templates select=xf:hint/
/textarea
 /xsl:template
 
 
 
  
  Robert E. Parrott
  Department of Physics
  351 Jefferson Laboratory
  Harvard University
  17 Oxford St.
  Cambridge, Massachusetts 02138
  (617)-495-2867
  [EMAIL PROTECTED]
  [EMAIL PROTECTED] (permanent)
 
 
 
 
 
 -
  Please check that your question  has not already
  been answered in the
  FAQ before posting.
  http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 


 __
 Do you Yahoo!?
 Y! Web Hosting - Let the expert host your web site
 http://webhosting.yahoo.com/

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]


-
Please

RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread Ryan Agler
I had this problem too, and had to write a custom java class to do this
inside XSLT, but it works.  

?xml version=1.0?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0 xmlns:java=http://xml.apache.org/xslt/java;
exclude-result-prefixes=java
xsl:template match=/
xsl:variable name=convertThisNode
xsl:copy-of select=/page/thing/
/xsl:variable
html
form
input name=txtNodexsl:attribute name=value
xsl:value-of
select=java:agler.SerializeXml.serializeXml($convertThisNode)//xsl:a
ttribute
/input
/form
/html
/xsl:template
/xsl:stylesheet

Not sure if you are familiar with making your own Jars (took me awhile
to figure out), but if you are, create you own jar and make it available
to Cocoon by putting it in Tomcat's common/lib and reference it in
web.xml's extra-classpath.  Here is the source for SerializeXml:

package agler;
import org.w3c.dom.Node;
import org.apache.xalan.serialize.SerializerToXML;
import java.io.StringWriter;
public class SerializeXml
{
   public static String serializeXml(Node node)
   {
  String ret = ;
  try 
  {
StringWriter sw = new StringWriter();
SerializerToXML serxml = new SerializerToXML();
serxml.setWriter(sw);
serxml.serialize(node);
  ret = sw.toString();
  }
  catch (Exception e){}
  return ret;
   }
}

Hope this helps, good luck.
+Ryan




-Original Message-
From: ROSSEL Olivier [mailto:olivier.rossel;airbus.com] 
Sent: Wednesday, October 23, 2002 5:05 AM
To: '[EMAIL PROTECTED]'
Subject: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

I have a HTML form, created from a XML file and a XSL Treansformation.

I need to pass a subtree of that XML as a parameter, via that form.

Is there a way, in XSLT, to transform a XML fragment into a string?
So I can have an input in my form that contains the text of this XML
fragment.

Corrolair when processing parameters sent by the form: 
is there a way, in XSLT, to transform as string into a XML fragment?




---cut here---


This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread Robert Koberg
Hi,

Can you simply do:

input name=txtNode
xsl:attribute name=value
xsl:copy-of select=/page/thing/
/xsl:attribute
/input

or perhaps:

textarea
xsl:copy-of select=/page/thing/
/textarea

best,
-Rob

 -Original Message-
 From: Ryan Agler [mailto:ryanagler;hotmail.com]
 Sent: Wednesday, October 23, 2002 10:20 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.
 
 
 I had this problem too, and had to write a custom java class to do this
 inside XSLT, but it works.  
 
 ?xml version=1.0?
 xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 version=1.0 xmlns:java=http://xml.apache.org/xslt/java;
 exclude-result-prefixes=java
 xsl:template match=/
 xsl:variable name=convertThisNode
 xsl:copy-of select=/page/thing/
 /xsl:variable
 html
 form
 input name=txtNodexsl:attribute name=value
 xsl:value-of
 select=java:agler.SerializeXml.serializeXml($convertThisNode)//xsl:a
 ttribute
 /input
 /form
 /html
 /xsl:template
 /xsl:stylesheet
 
 Not sure if you are familiar with making your own Jars (took me awhile
 to figure out), but if you are, create you own jar and make it available
 to Cocoon by putting it in Tomcat's common/lib and reference it in
 web.xml's extra-classpath.  Here is the source for SerializeXml:
 
 package agler;
 import org.w3c.dom.Node;
 import org.apache.xalan.serialize.SerializerToXML;
 import java.io.StringWriter;
 public class SerializeXml
 {
public static String serializeXml(Node node)
{
   String ret = ;
   try 
   {
 StringWriter sw = new StringWriter();
 SerializerToXML serxml = new SerializerToXML();
 serxml.setWriter(sw);
 serxml.serialize(node);
 ret = sw.toString();
   }
   catch (Exception e){}
   return ret;
}
 }
 
 Hope this helps, good luck.
 +Ryan
 
 
 
 
 -Original Message-
 From: ROSSEL Olivier [mailto:olivier.rossel;airbus.com] 
 Sent: Wednesday, October 23, 2002 5:05 AM
 To: '[EMAIL PROTECTED]'
 Subject: [Off-topic:XSLT] Passing an XML fragment via a HTML form.
 
 I have a HTML form, created from a XML file and a XSL Treansformation.
 
 I need to pass a subtree of that XML as a parameter, via that form.
 
 Is there a way, in XSLT, to transform a XML fragment into a string?
 So I can have an input in my form that contains the text of this XML
 fragment.
 
 Corrolair when processing parameters sent by the form: 
 is there a way, in XSLT, to transform as string into a XML fragment?
 
 
 
 
 ---cut here---
 
 
 This e-mail is intended only for the above addressee. It may contain
 privileged information. If you are not the addressee you must not copy,
 distribute, disclose or use any of the information in it. If you have
 received it in error please delete it and immediately notify the sender.
 Security Notice: all e-mail, sent to or from this address, may be
 accessed by someone other than the recipient, for system management and
 security reasons. This access is controlled under Regulation of
 Investigatory Powers Act 2000, Lawful Business Practises.
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread Ryan Agler
It will work for a textarea if that is an option, but for an input, all
the tags get stripped out and just the content gets included.

-Original Message-
From: Robert Koberg [mailto:rob;koberg.com] 
Sent: Wednesday, October 23, 2002 1:41 PM
To: [EMAIL PROTECTED]
Subject: RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

Hi,

Can you simply do:

input name=txtNode
xsl:attribute name=value
xsl:copy-of select=/page/thing/
/xsl:attribute
/input

or perhaps:

textarea
xsl:copy-of select=/page/thing/
/textarea

best,
-Rob

 -Original Message-
 From: Ryan Agler [mailto:ryanagler;hotmail.com]
 Sent: Wednesday, October 23, 2002 10:20 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.
 
 
 I had this problem too, and had to write a custom java class to do
this
 inside XSLT, but it works.  
 
 ?xml version=1.0?
 xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 version=1.0 xmlns:java=http://xml.apache.org/xslt/java;
 exclude-result-prefixes=java
 xsl:template match=/
 xsl:variable name=convertThisNode
 xsl:copy-of select=/page/thing/
 /xsl:variable
 html
 form
 input name=txtNodexsl:attribute name=value
 xsl:value-of

select=java:agler.SerializeXml.serializeXml($convertThisNode)//xsl:a
 ttribute
 /input
 /form
 /html
 /xsl:template
 /xsl:stylesheet
 
 Not sure if you are familiar with making your own Jars (took me awhile
 to figure out), but if you are, create you own jar and make it
available
 to Cocoon by putting it in Tomcat's common/lib and reference it in
 web.xml's extra-classpath.  Here is the source for SerializeXml:
 
 package agler;
 import org.w3c.dom.Node;
 import org.apache.xalan.serialize.SerializerToXML;
 import java.io.StringWriter;
 public class SerializeXml
 {
public static String serializeXml(Node node)
{
   String ret = ;
   try 
   {
 StringWriter sw = new StringWriter();
 SerializerToXML serxml = new SerializerToXML();
 serxml.setWriter(sw);
 serxml.serialize(node);
 ret = sw.toString();
   }
   catch (Exception e){}
   return ret;
}
 }
 
 Hope this helps, good luck.
 +Ryan
 
 
 
 
 -Original Message-
 From: ROSSEL Olivier [mailto:olivier.rossel;airbus.com] 
 Sent: Wednesday, October 23, 2002 5:05 AM
 To: '[EMAIL PROTECTED]'
 Subject: [Off-topic:XSLT] Passing an XML fragment via a HTML form.
 
 I have a HTML form, created from a XML file and a XSL Treansformation.
 
 I need to pass a subtree of that XML as a parameter, via that form.
 
 Is there a way, in XSLT, to transform a XML fragment into a string?
 So I can have an input in my form that contains the text of this XML
 fragment.
 
 Corrolair when processing parameters sent by the form: 
 is there a way, in XSLT, to transform as string into a XML fragment?
 
 
 
 
 ---cut here---
 
 
 This e-mail is intended only for the above addressee. It may contain
 privileged information. If you are not the addressee you must not
copy,
 distribute, disclose or use any of the information in it. If you have
 received it in error please delete it and immediately notify the
sender.
 Security Notice: all e-mail, sent to or from this address, may be
 accessed by someone other than the recipient, for system management
and
 security reasons. This access is controlled under Regulation of
 Investigatory Powers Act 2000, Lawful Business Practises.
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




[Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread ROSSEL Olivier
I have a HTML form, created from a XML file and a XSL Treansformation.

I need to pass a subtree of that XML as a parameter, via that form.

Is there a way, in XSLT, to transform a XML fragment into a string?
So I can have an input in my form that contains the text of this XML
fragment.

Corrolair when processing parameters sent by the form: 
is there a way, in XSLT, to transform as string into a XML fragment?




---cut here---


This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread Emmanuil Batsis (Manos)
ROSSEL Olivier wrote:


I need to pass a subtree of that XML as a parameter, via that form.

Is there a way, in XSLT, to transform a XML fragment into a string?
So I can have an input in my form that contains the text of this XML
fragment.


How about parsing the form element value to a DOM object (either client 
or server side) and extract the DOM node that serves as the root of the 
fragment you need?

Manos


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]



RE: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread ROSSEL Olivier
  I need to pass a subtree of that XML as a parameter, via that form.
  
  Is there a way, in XSLT, to transform a XML fragment into a string?
  So I can have an input in my form that contains the text 
 of this XML
  fragment.
 
 How about parsing the form element value to a DOM object 
 (either client 
 or server side) and extract the DOM node that serves as the 
 root of the 
 fragment you need?

You think I should use Java/XSP for such a process?
Ok. Let's say I put the subtree to be sent into a DOM object.
How do I stringify it? (I presume I cannot pass a Java object 
via a HTML form :-)

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: [Off-topic:XSLT] Passing an XML fragment via a HTML form.

2002-10-23 Thread Emmanuil Batsis (Manos)
ROSSEL Olivier wrote:

I need to pass a subtree of that XML as a parameter, via that form.

Is there a way, in XSLT, to transform a XML fragment into a string?
So I can have an input in my form that contains the text 

of this XML


fragment.


How about parsing the form element value to a DOM object 
(either client 
or server side) and extract the DOM node that serves as the 
root of the 
fragment you need?


You think I should use Java/XSP for such a process?


Ideally, before submission, you parse the form value to a DOM object via 
Javascript (easy in both IE and Moz). You then locate the node 
(fragment) of choice and use it's text serialization (XML) to replace 
the earlier value of the form. Your server will thus get only the 
fragment you need and get away with less work.


Manos


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]