IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to specify the indent parameter and others

  • 1.  How to specify the indent parameter and others

    Posted Wed February 22, 2006 05:02 PM

    By default xquery set indent parameter as no. How to overwrite this in a xquery?

    If I want to put "<?xml version="1.0" endoing="UTF-8"?> in the xquery output , where and how to put it? It looks like no matter where I put it, it always gives me compilation error.

    Thanks,


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: How to specify the indent parameter and others

    Posted Thu February 23, 2006 08:11 AM

    Hi,

    you cannot add

    
    <?xml version="1.0" endoing="UTF-8"?>

    directly to the text of an XQuery, but you can force XQuery to return
    this by specifying

     
    {?serialization method="xml"?}

    as the first line of your XQuery. Please note that the result of the XQuery expression must be well-formed XML then!

    What do you mean by indent parameter? Indentation is not a concept of XML. You can only indent a repesentation of XML, e.g. by using a style sheet (see e.g. section SerializationSpec of the Tamino documentation)

    regards

    harald


    #Tamino
    #API-Management
    #webMethods


  • 3.  RE: How to specify the indent parameter and others

    Posted Thu February 23, 2006 02:52 PM

    Does “the first line of your XQuery” mean before everything including the prolog? I tried different postion and it doesn’t seemed to work.

    What I meant “indent parameter” is the serialization parameter listed in C.3 from “XQuery 1.0: An XML Query Language” on w3c website.

    In XSLT, I can have:
    <xsl:output method=“xml” version=“1.0” encoding=“UTF-8” indent=“yes”/>

    basicly what I want to do is to translate this into xquery. How would I do it?

    Thanks.


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: How to specify the indent parameter and others

    Posted Thu February 23, 2006 03:28 PM

    Does “the first line of your XQuery” mean before everything including the prolog?

    Yes


    #API-Management
    #Tamino
    #webMethods