XMLTransform won't transform

Ebay API sends back an XML response that starts like this:
<FindPopularItemsResponse
xmlns="urn:ebay:apis:eBLBaseComponents">
When I do an XMLTransform on it, nothing shows until I remove
the xmlns="... portion.
Anybody have a way to do this on the fly or someway of
getting XMLTransform to work with that bit still in there?

1) create an XSL file called removeNamespacesAndPrefixes.xsl
with the following code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no"/>
<xsl:template
match="/|comment()|processing-instruction()">
<xsl:copy>
<!-- go process children (applies to root node only)
-->
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<!-- go process attributes and children -->
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
2) create a CFM template with the following:
<cffile action="read"
file="#ExpandPath('.')#/file_with_node_namespaces_and_prefixes.xml"
variable="XMLDoc">
<cfset transformedXML = XmlTransform(XMLDoc,
"removeNamespacesAndPrefixes.xsl") />
<cfoutput>
<xmp>
#transformedXML#
</xmp>
</cfoutput>

Similar Messages

  • Different output XMLTRANSFORM and XMLTYPE.TRANSFORM

    Hi,
    we upgrade from 10gR2 to 11gR2 and still have problems with XML transformation. Under unknown circumstances the XMLTRANSFORM function
    fails with "LPX-00660: Not a well-formed document or external entity" when the count of Page elements is greater then one.
    It seems, this bug isnt fixed in 11gR2...
    SET SCAN OFF
    DECLARE
      xml     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
    <FILE>
      <DOCUMENT>
        <PAGE>
          <b101f>Hello</b101f>
          <b101>World</b101>
          <f101/>
          <REGARDS/>
        </PAGE>
      </DOCUMENT>
      <DOCUMENT>
        <PAGE>
          <list_layout xpos="10" lsign="+"/>
          <le>May</le>
          <le>the</le>
          <le stil="f">force</le>
          <le>be</le>
          <le>with</le>
          <le>you</le>
          <f101/>
          <REGARDS/>
        </PAGE>
      </DOCUMENT>
    </FILE>
      xsl     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <xsl:template match="node()|@*">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="FILE">
        <FILE>
          <xsl:apply-templates/>
        </FILE>
      </xsl:template>
      <xsl:template match="DOCUMENT">
        <DOCUMENT>
          <xsl:apply-templates/>
        </DOCUMENT>
      </xsl:template>
      <xsl:template match="PAGE">
        <PAGE>
          <CONTENT>
            <xsl:apply-templates/>
          </CONTENT>
        </PAGE>
      </xsl:template>
      <xsl:template match="REGARDS">
        <xsl:text disable-output-escaping="yes">&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</xsl:text>
      </xsl:template>
    </xsl:stylesheet>
      buf   VARCHAR2(32767 CHAR);
    BEGIN
      DBMS_OUTPUT.PUT_LINE(xml.transform(xsl).getClobVal());
      SELECT  xmltransform(xml, xsl).getStringVal()
      INTO    buf
      FROM    dual;
      DBMS_OUTPUT.PUT_LINE(buf);
    END;
    /Oracle Docu: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb08tra.htm
    XMLType instance can be transformed in the following ways:
    Using Oracle SQL function XMLtransform or XMLType method transform() in the database.
    Using Oracle XML Developer's Kit transformation options in the middle tier, such as XSLT Processor for Java.
    You can alternatively use XMLType method transform() as an alternative to Oracle SQL function XMLtransform. It has the same functionality.
    Output:
    <FILE>
    <DOCUMENT>
    <PAGE>
    <CONTENT>
    <b101f>Hello</b101f>
    <b101>World</b101>
    <f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
    </PAGE>
    </DOCUMENT>
    <DOCUMENT>
    <PAGE>
    <CONTENT>
    <list_layout xpos="10" lsign="+"/>
    <le>May</le>
    <le>the</le>
    <le stil="f">force</le>
    <le>be</le>
    <le>with</le>
    <le>you</le>
    <f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
    </PAGE>
    </DOCUMENT>
    </FILE>
    <FILE><DOCUMENT><PAGE><CONTENT><b101f>Hello</b101f><b101>World</b101><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT><DOCUMENT><PAGE><CONTENT><list_layout xpos="10" lsign="+"></list_layout><le>May</le><le>the</le><le stil="f">force</le><le>be</le><le>with</le><le>you</le><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT></FILE>

    Hi,
    we upgrade from 10gR2 to 11gR2 and still have problems with XML transformation. Under unknown circumstances the XMLTRANSFORM function
    fails with "LPX-00660: Not a well-formed document or external entity" when the count of Page elements is greater then one.
    It seems, this bug isnt fixed in 11gR2...
    SET SCAN OFF
    DECLARE
      xml     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
    <FILE>
      <DOCUMENT>
        <PAGE>
          <b101f>Hello</b101f>
          <b101>World</b101>
          <f101/>
          <REGARDS/>
        </PAGE>
      </DOCUMENT>
      <DOCUMENT>
        <PAGE>
          <list_layout xpos="10" lsign="+"/>
          <le>May</le>
          <le>the</le>
          <le stil="f">force</le>
          <le>be</le>
          <le>with</le>
          <le>you</le>
          <f101/>
          <REGARDS/>
        </PAGE>
      </DOCUMENT>
    </FILE>
      xsl     XMLTYPE := XMLTYPE('<?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <xsl:template match="node()|@*">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="FILE">
        <FILE>
          <xsl:apply-templates/>
        </FILE>
      </xsl:template>
      <xsl:template match="DOCUMENT">
        <DOCUMENT>
          <xsl:apply-templates/>
        </DOCUMENT>
      </xsl:template>
      <xsl:template match="PAGE">
        <PAGE>
          <CONTENT>
            <xsl:apply-templates/>
          </CONTENT>
        </PAGE>
      </xsl:template>
      <xsl:template match="REGARDS">
        <xsl:text disable-output-escaping="yes">&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</xsl:text>
      </xsl:template>
    </xsl:stylesheet>
      buf   VARCHAR2(32767 CHAR);
    BEGIN
      DBMS_OUTPUT.PUT_LINE(xml.transform(xsl).getClobVal());
      SELECT  xmltransform(xml, xsl).getStringVal()
      INTO    buf
      FROM    dual;
      DBMS_OUTPUT.PUT_LINE(buf);
    END;
    /Oracle Docu: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb08tra.htm
    XMLType instance can be transformed in the following ways:
    Using Oracle SQL function XMLtransform or XMLType method transform() in the database.
    Using Oracle XML Developer's Kit transformation options in the middle tier, such as XSLT Processor for Java.
    You can alternatively use XMLType method transform() as an alternative to Oracle SQL function XMLtransform. It has the same functionality.
    Output:
    <FILE>
    <DOCUMENT>
    <PAGE>
    <CONTENT>
    <b101f>Hello</b101f>
    <b101>World</b101>
    <f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
    </PAGE>
    </DOCUMENT>
    <DOCUMENT>
    <PAGE>
    <CONTENT>
    <list_layout xpos="10" lsign="+"/>
    <le>May</le>
    <le>the</le>
    <le stil="f">force</le>
    <le>be</le>
    <le>with</le>
    <le>you</le>
    <f101/>&#38;lt;lt;b101&#38;lt;gt;Best regards&#38;lt;lt;/b101&#38;lt;gt;</CONTENT>
    </PAGE>
    </DOCUMENT>
    </FILE>
    <FILE><DOCUMENT><PAGE><CONTENT><b101f>Hello</b101f><b101>World</b101><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT><DOCUMENT><PAGE><CONTENT><list_layout xpos="10" lsign="+"></list_layout><le>May</le><le>the</le><le stil="f">force</le><le>be</le><le>with</le><le>you</le><f101></f101><b101>Best regards</b101></CONTENT></PAGE></DOCUMENT></FILE>

  • Edge Animate origin won't transform, keeps snapping back to original position.

    I am working with an Animate composition in Edge Animate CC on a mac.  When I try to transform the origin and select an item, select the transform tool and drag the origin it keeps snapping back to its original position.  I have tried turning off snaps and changing the origin in the properties panel but it snaps right back no matter how I try to change it.  It is as if it's locked in place.  Any ideas on why it won't change?  The items are not grouped and it is a problem will all of the individual elements that I have tried to change.  Thanks in advance for any advice.

    Thank you.  I have shut it down and restarted the Mac and still have the problem.  I am recreating the animation now in case the file was somehow corrupted.  Even with the new file, I am getting an error that Animate encountered a problem and that I should save and restart Animate.  I think I will uninstall and try reinstalling Animate.  Do I have anything to lose by trying that since it looks like I need to recreate anyway?  Thanks again for your help!

  • XML Won't Transform in Batch [JS, CS3]

    When I use import xml manually into indesign, it works - but when I import it using the script below, it does not apply the transformation.
    Any ideas?
    with(app.activeDocument.xmlImportPreferences) {
            allowTransform = true;
            transformFilename = XMLTransformFile.STYLESHEET_IN_XML;
            createLinkToXML = false;
            ignoreWhitespace =true;
            ignoreUnmatchedIncoming = false;
            importCALSTables = true;
            importToSelected = false;
            allowTransform = false;
           importTextIntoTables = true;   
           repeatTextElements = false;
           removeUnmatchedExisting = false;
           importStyle = XMLImportStyles.MERGE_IMPORT;

    arrgh, this was not was i wanted to test: it works with cs3 if you omit the with {} statement.
    if you set the xmlImportPreferences direct it does work here.
    app.activeDocument.xmlImportPreferences.allowTransform = true;
    app.activeDocument.xmlImportPreferences.transformFilename = XMLTransformFile.STYLESHEET_IN_XML;
    so this is not working:
    var _file = File.openDialog ("Choose XML File");
    with(app.activeDocument.xmlImportPreferences) {
            allowTransform = true;
            transformFilename = XMLTransformFile.STYLESHEET_IN_XML;
            //transformFilename = File.openDialog ("Choose XSL File");
    app.activeDocument.importXML(_file);
    but this works fine:
    var _file = File.openDialog ("Choose XML File");
    app.activeDocument.xmlImportPreferences.allowTransform = true;
    app.activeDocument.xmlImportPreferences.transformFilename = XMLTransformFile.STYLESHEET_IN_XML;
    //transformFilename = File.openDialog ("Choose XSL File");   
    app.activeDocument.importXML(_file);

  • Illustrator won't transform images!!

    Hi everryone.
    I tryed pressing ctl + T on windows illustrator to transform, it did it before but now theres a red line around my image and I can't edit it, does anyone know what im doing wrong?
    thanks
    Helen c

    I think you're confusing keyboard shortcuts with Photoshop's.
    While Ctrl+T gets you free transform in Photoshop, it merely toggles Character palette visibility in Illustrator.
    Hit 'E'. That's the keyboard shortcut for the free transform tool in Illustrator. For quick resizing/scaling, you can use the regular selection tool (black arrow) if you have bounding box set to show.
    Yes... I know... Adobe cross-application user interface uniformity is an ongoing joke.
    I don't know what the red line is doing there. You might somehow have added a stroke to your image.

  • Why won't 'Transform Pattern Tiles' stay checked?

    It seems as though having this option in the Preferences unchecked is the default.  I work with pattern tiles a lot and I ALWAYS want them to scale and move etc... with the object they're applied to.  Every time I open an old file (from a previous version of AI where this option was checked) or start a new file, the option is unchecked, and I've really messed up some art when I've edited without realizing my pattern tiles aren't following along.
    How do I make this option persistant? It's driving me crazy that I always have to go in and check the damn little box before I can make any edits.
    BTW, I'm using AI CS6 through the cloud, so I should be all up to date.
    Thanks

    OK- I don't get it.  It seems to be working the way it's supposed to right now.  Since I wrote here last, I've been opening old files and opening new documents, and the box stays checked.  I've re-started Illustrator then opened old files and new documents and it's stayed checked.  I re-started my computer then started Illustrator and opened old files and new documents and the box has stayed checked.  This is how it's supposed to be- so now I can't figure out how it has gotten unchecked in the past. 
    I do mockups of my company's pajamas and use pattern tiles to represent the pattern on the pajama fabric.  The size of the pattern compared to the pajama as a whole is very important, so I NEVER deliberately turn 'Transform Pattern Tiles' off.  I ALWAYS want it on.  I've only ever checked the box to turn it back on when I've noticed that my pattern tiles aren't behaving the way they should.  I've been using CS6 since last November (older versions of Illustrator for years before that), and have had to keep checking the box time after time with this version.  And right before starting this thread I had just opened a new document, applied a  pattern tile, and noticed it wasn't behaving properly.  So I checked Preferences, and, sure enough, 'Transform Pattern Tiles' was unchecked. 
    I haven't had any other problems with Preferences- no crashes, nothing else resetting or anything that I've noticed.  Maybe there's something in my workflow that's causing it that I don't know about.  I just tried changing the Profile when opening a new document back and forth between a preset like 'Print' and 'Custom' (by changing the default Units as I sometimes do), and the box is staying checked the way it's supposed to. 
    I don't know what I'm doing wrong, but I guess I'll keep checking to see if I can narrow it down. 
    Thanks for the replies.

  • XMLTYPE.transform works differently in SQL and PL/SL

    Hi, when I use XMLTYPE.transform in SQL, it's working fine - try this:
    SELECT XMLTYPE.createXml('<data/>').transform(XMLTYPE.createXml('<?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" />
    <xsl:template match="/">
    <HTML>
    <BODY>
    <TABLE>
    <TR><TD><INPUT readOnly="readOnly" size="19" maxLength="30" type="text" value="test..."/></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>')).getClobVal() FROM DUAL;
    But when i tried to do tha same in PL/SQL, i obtain error - try this:
    DECLARE
    lClob CLOB;
    lXsl XMLTYPE;
    lXml XMLTYPE;
    BEGIN
    lXml := XMLTYPE.createXml('<data/>');
    lXsl := XMLTYPE.createXml('<?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" />
    <xsl:template match="/">
    <HTML>
    <BODY>
    <TABLE>
    <TR><TD><INPUT readOnly="readOnly" size="19" maxLength="30" type="text" value="test..."/></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>');
    lClob := lXml.transform(lXsl).getClobVal();
    END;
    Error is:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00210: expected '=' instead of '>'
    Error at line 7
    ORA-06512: at "SYS.XMLTYPE", line 138
    ORA-06512: at line 20
    Oracle version is 11.2.0.2.0.
    Knows anybody where is the problem?
    Thanks, R. Kazimir

    Hi,
    Actually it does not work for both.
    Remove .getClobVal() method and see what happens :
    SQL>  SELECT XMLTYPE.createXml('<data/>')
      2  .transform(XMLTYPE.createXml('<?xml version="1.0" encoding="UTF-8"?>
      3  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      4  <xsl:output method="html" />
      5  <xsl:template match="/">
      6  <HTML>
      7  <BODY>
      8  <TABLE>
      9  <TR><TD><INPUT readOnly="readOnly" size="19" maxLength="30" type="text" value="test..."/></TD><
    /TR>
    10  </TABLE>
    11  </BODY>
    12  </HTML>
    13  </xsl:template>
    14  </xsl:stylesheet>'))
    15  FROM dual;
    ERROR:
    ORA-31011: Echec d'analyse XML
    ORA-19202: Une erreur s'est produite lors du traitement la fonction XML (
    LPX-00210: '=' attendu plutôt que '>'
    Error at line 1
    )Besides, using getClobVal() in the SQL version produces an invalid output :
    <HTML>
    <BODY>
      <TABLE>
       <TR>
        <TD>
         <INPUT readOnly>
         </INPUT>
        </TD>
       </TR>
      </TABLE>
    </BODY>
    </HTML>The readOnly attribute is not well-formed.
    Even stranger : change the just the case of the attribute value, e.g. "readOnly" to "readonly", and it works!
    I'm not sure what's happening here. Most likely a combination of bugs regarding html output method.
    As a workaround, you can use output method "xml" instead. Works in any cases.
    On a side note, in your version, getter methods like getClobVal() are deprecated. Oracle now recommends using XMLSerialize function.
    The same goes with XSL transformation, where one should use XMLTransform instead of transform() method.

  • XSLT of large documents incomplete

    XMLTransform() and XMLType.transform() do not return a complete result when fed with large xml documents (approx > 3.5 MB). Smaller documents transform perfectly.
    Example: let table test (id NUMBER, xmltext CLOB) contain two records:
    ID DBMS_LOB.GETLENGTH(XMLTEXT)
    1 4137788 (xml document)
    2 2143 (xsl document)
    Using SQL*Plus, the following command returns only the last portion (18332 bytes) of the expected result (83868 bytes).
    select xmltransform(
    (select xmltype(xmltext) from test where id = 1),
    (select xmltype(xmltext) from test where id = 2)).getClobVal()
    from dual;
    The same happens when using a PL/SQL procedure with temporary clob variables. However, when the two xml records are spooled to text files and fed to an external xalan processor the result is correct and complete!
    Is this a memory problem? Oracle reports no errors, no alertlog entries, no trace files. We use Oracle9i Enterprise Edition Release 9.2.0.3.0 under SUN Solaris 9.
    Thank you for any help. Of course I can provide the two documents.
    Dirk Schmatz

    Yes, long was set to 2000000000 (the maximum).
    The problem not only occurs in SQL*Plus. The exact same truncation occurs if the transformation is built into a procedure which is then accessed with a web browser by an application server.

  • XDK XSLT proccessor alternative

    Hi,
    I'm using XSL transformation build in XDK, but there is a bug admitted by Oracle. They try to fix it but it takes too long.
    My question is... Is there any alternative to XDK XSL processor? Something what can be called in PLSQL. ... Java, C++, whatever ?
    Thanks.

    From the XMLDB 11g Developers Manual:
    XMLType instance can be transformed in the following ways:
    - Using SQL function XMLtransform (or XMLType method transform()) in the database.
    - Using XDK transformation options in the middle tier, such as XSLT Processor for Java.
    XMLTRANSFORM and XMLType.transform():
    Examples
    The examples in this section illustrate how to use SQL function XMLtransform and XMLType method transform() to transform XML data stored as XMLType to various formats.
    Example 10-1 Registering XML Schema and Inserting XML Data
    This example sets up the XML schema and tables needed to run other examples in this chapter. (The call to deleteSchema here ensures that there is no existing XML schema before creating one. If no such schema exists, then deleteSchema produces an error.)
    BEGIN
      -- Delete the schema, if it already exists; otherwise, this produces an error.
      DBMS_XMLSCHEMA.deleteSchema('http://www.example.com/schemas/ipo.xsd',4);
    END;
    BEGIN
    -- Register the schema
    DBMS_XMLSCHEMA.registerSchema('http://www.example.com/schemas/ipo.xsd',
    '<schema targetNamespace="http://www.example.com/IPO"
             xmlns="http://www.w3.org/2001/XMLSchema"
             xmlns:ipo="http://www.example.com/IPO">
      <!-- annotation>
       <documentation xml:lang="en">
        International Purchase order schema for Example.com
        Copyright 2000 Example.com. All rights reserved.
       </documentation>
      </annotation -->
      <element name="purchaseOrder" type="ipo:PurchaseOrderType"/>
      <element name="comment" type="string"/>
      <complexType name="PurchaseOrderType">
       <sequence>
        <element name="shipTo"     type="ipo:Address"/>
        <element name="billTo"     type="ipo:Address"/>
        <element ref="ipo:comment" minOccurs="0"/>
        <element name="items"      type="ipo:Items"/>
       </sequence>
       <attribute name="orderDate" type="date"/>
      </complexType>
      <complexType name="Items">
       <sequence>
        <element name="item" minOccurs="0" maxOccurs="unbounded">
         <complexType>
          <sequence>
           <element name="productName" type="string"/>
           <element name="quantity">
            <simpleType>
             <restriction base="positiveInteger">
              <maxExclusive value="100"/>
             </restriction>
            </simpleType>
           </element>
           <element name="USPrice"    type="decimal"/>
           <element ref="ipo:comment" minOccurs="0"/>
           <element name="shipDate"   type="date" minOccurs="0"/>
          </sequence>
          <attribute name="partNum" type="ipo:SKU" use="required"/>
         </complexType>
        </element>
       </sequence>
      </complexType>
      <complexType name="Address">
       <sequence>
        <element name="name"    type="string"/>
        <element name="street"  type="string"/>
        <element name="city"    type="string"/>
        <element name="state"   type="string"/>
        <element name="country" type="string"/>
        <element name="zip"     type="string"/>
       </sequence>
      </complexType>
      <simpleType name="SKU">
       <restriction base="string">
        <pattern value="[0-9]{3}-[A-Z]{2}"/>
       </restriction>
      </simpleType>
    </schema>',
       TRUE, TRUE, FALSE);
    END;
    -- Create table to hold XML instance documents
    DROP TABLE po_tab;
    CREATE TABLE po_tab (id NUMBER, xmlcol XMLType)
    XMLType COLUMN xmlcol
    XMLSCHEMA "http://www.example.com/schemas/ipo.xsd"
    ELEMENT "purchaseOrder";
    INSERT INTO po_tab
      VALUES(1, XMLType(
                  '<?xml version="1.0"?>
                   <ipo:purchaseOrder
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xmlns:ipo="http://www.example.com/IPO"
                     xsi:schemaLocation="http://www.example.com/IPO
                                         http://www.example.com/schemas/ipo.xsd"
                     orderDate="1999-12-01">
                     <shipTo>
                       <name>Helen Zoe</name>
                       <street>121 Broadway</street>
                       <city>Cardiff</city>
                       <state>Wales</state>
                       <country>UK</country>
                       <zip>CF2 1QJ</zip>
                     </shipTo>
                     <billTo>
                       <name>Robert Smith</name>
                       <street>8 Oak Avenue</street>
                       <city>Old Town</city>
                       <state>CA</state>
                       <country>US</country>
                       <zip>95819</zip>
                     </billTo>
                     <items>
                       <item partNum="833-AA">
                         <productName>Lapis necklace</productName>
                         <quantity>1</quantity>
                         <USPrice>99.95</USPrice>
                         <ipo:comment>Want this for the holidays!</ipo:comment>
                         <shipDate>1999-12-05</shipDate>
                       </item>
                     </items>
                   </ipo:purchaseOrder>'));Example 10-2 Using XMLTRANSFORM and DBURITYPE to Retrieve a Style Sheet
    DBURIType is described in Chapter 20, "Accessing Data Through URIs".
    DROP TABLE stylesheet_tab;
    CREATE TABLE stylesheet_tab(id NUMBER, stylesheet XMLType);
    INSERT INTO stylesheet_tab
      VALUES (1,
              XMLType(
                '<?xml version="1.0" ?>
                 <xsl:stylesheet version="1.0"
                                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
                   <xsl:template match="*">
                     <td>
                       <xsl:choose>
                         <xsl:when test="count(child::*) > 1">
                           <xsl:call-template name="nested"/>
                         </xsl:when>
                         <xsl:otherwise>
                           <xsl:value-of select="name(.)"/>:<xsl:value-of
                                                              select="text()"/>
                         </xsl:otherwise>
                       </xsl:choose>
                     </td>
                   </xsl:template>
                   <xsl:template match="*" name="nested" priority="-1" mode="nested2">
                     <b>
                       <!-- xsl:value-of select="count(child::*)"/ -->
                       <xsl:choose>
                         <xsl:when test="count(child::*) > 1">
                           <xsl:value-of select="name(.)"/>:<xsl:apply-templates
                                                              mode="nested2"/>
                         </xsl:when>
                         <xsl:otherwise>
                           <xsl:value-of select="name(.)"/>:<xsl:value-of
                                                              select="text()"/>
                         </xsl:otherwise>
                       </xsl:choose>
                     </b>
                   </xsl:template>
                 </xsl:stylesheet>'));
    SELECT
      XMLtransform(x.xmlcol,
                   DBURIType('/XDB/STYLESHEET_TAB/ROW
                                [ID=1]/STYLESHEET/text()').getXML()).getStringVal()
      AS result
      FROM po_tab x;
    This produces the following output (pretty-printed here for readability):
    RESULT
    <td>
      <b>ipo:purchaseOrder:
        <b>shipTo:
          <b>name:Helen Zoe</b>
          <b>street:100 Broadway</b>
          <b>city:Cardiff</b>
          <b>state:Wales</b>
          <b>country:UK</b>
          <b>zip:CF2 1QJ</b>
        </b>
        <b>billTo:
          <b>name:Robert Smith</b>
          <b>street:8 Oak Avenue</b>
          <b>city:Old Town</b>
          <b>state:CA</b>
          <b>country:US</b>
          <b>zip:95819</b>
        </b>
        <b>items:</b>
      </b>
    </td>Example 10-3 Using XMLTRANSFORM and a Subquery to Retrieve a Style Sheet
    This example illustrates the use of a stored style sheet to transform XMLType instances. Unlike the previous example, this example uses a scalar subquery to retrieve the stored style sheet:
    SELECT XMLtransform(x.xmlcol,
        (SELECT stylesheet FROM stylesheet_tab WHERE id = 1)).getStringVal()
         AS result
       FROM po_tab x;Example 10-4 Using Method transform() with a Transient Style Sheet
    This example uses XMLType method transform() to transform an XMLType instance using a transient style sheet:
    SELECT x.xmlcol.transform(XMLType(
    '<?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="*">
        <td>
        <xsl:choose>
          <xsl:when test="count(child::*) > 1">
            <xsl:call-template name="nested"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="name(.)"/>:<xsl:value-of select="text()"/>
          </xsl:otherwise>
        </xsl:choose>
        </td>
    </xsl:template>
    <xsl:template match="*" name="nested" priority="-1" mode="nested2">
        <b>
        <!-- xsl:value-of select="count(child::*)"/ -->
        <xsl:choose>
          <xsl:when test="count(child::*) > 1">
            <xsl:value-of select="name(.)"/>:<xsl:apply-templates mode="nested2"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="name(.)"/>:<xsl:value-of select="text()"/>
          </xsl:otherwise>
        </xsl:choose>
        </b>
    </xsl:template>
    </xsl:stylesheet>'
    )).getStringVal()
    FROM po_tab x;
    So in short XMLTRANSFORM ;-) ?

  • PipedInputStream and PipedOutputStream with threads

    I'm using PipedInputStream and PipedOutputStream and have a question about threads. In a class I've created I have a method that looks like this:
    public InputStream transform(InputStream xmlInputStream, File xslFile) {
    PipedInputStream pipedInput = null;
    PipedOutputStream pipedOutput = null;
    try{
         pipedOutput = new PipedOutputStream();
         pipedInput = new PipedInputStream(pipedOutput);
         //use XmlTransformation thread to transform - piped output goes to piped input
    XmlTransformation xw = new XmlTransformation(xmlInputStream, xslFile, pipedOutput);
    Thread wThread = new Thread(xw);
         wThread.start();
    }catch(Exception e){
         System.out.println("XmlToFlat.transform(InputStream, File) "+ e);
    return pipedInput;
    } //end createEdiFile(File) Method
    XmlTransformation implements Runnable. I created a separate thread for this process (XmlTransformation) because using PipedInput and PipedOutput in the same thread is not recommended because of deadlocking (It was deadlocking before I made the separate thread). I use the PipedInputStream (outputStream) returned from this method as input later in my class.
    Anyway, everything works. I call the above method "transform()" in another method and process the returned InputStream. But I don't understand why it works everytime??? If I call this method, which creates a thread (XmlTransformation), and I'm using the InputStream returned from this as input for another method, isn't it possible that the method that's trying to use the input returned from transform() could continue executing before it gets the input back from the transform() method because it's a separated thread (the main(), for example)? Or do the threads act differently because I'm using PipedInput and PipedOutput and they are connected? Am I just getting lucky that this is working everytime?
    Thanks in advance for any help.

    So using the PipedInputStream and PipedOutputStream is a better method or practice for this situation than using ByteArrays? This has only the disadvantage of taking more memory, right??? I take a ByteArrayOutputStream and convert it to a ByteArrayInputStream and use the ByteArrayInputStream for input in the following:
    public File convertToFile(File xmlFile, File flatFile) {
    XmlConvert xml_convert; //declare the converter
    if (transform){ //if the file needs to be transformed before conversion
    ByteArrayOutputStream xmlBytes = new ByteArrayOutputStream();
    byte bXml[];
    try{
    //transform the xml document
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
    transformer.transform(new StreamSource(xmlFile), new StreamResult(xmlBytes));
    //convert the output to a byteArray so that in can be used as input               
    bXml = xmlBytes.toByteArray();
    ByteArrayInputStream bais = new ByteArrayInputStream(bXml);
    BufferedReader in = new BufferedReader new InputStreamReader(bais));
    BufferedWriter out = new BufferedWriter(new FileWriter(flatFile));
    xml_convert = new XmlConvert(new FileReader(xflFile), true);
    xml_convert.xmlToFlat(in, out);
    }catch(Exception e){
    System.out.println("XmlToFlat.convertToFile(File, File)-if: "+ e);
    }else{
    try{
    xml_convert = new XmlConvert(new FileReader(xflFile), true);
    xml_convert.xmlToFlat(new FileReader(xmlFile), new FileWriter(flatFile));
    }catch(Exception e){
    System.out.println("XmlToFlat.convertToFile(File, File)-else: "+ e);
    return flatFile;
    } //end createEdiFile(File) Method

  • XSL Transformation won't run in Web Start

    Hello,
    I am using the javax.xml.transform.Transformer implementation built into Java 1.5.x to transform an XML document into HTML using an XSLT transformation source. This code works perfectly if I run the app outside of Java Web Start. However, if I run the app in web start, the output is partial. More specifically, the XML and the XSLT load just fine in web start (I've confirmed this), but the end result of the Transformation is a properly formatted HTML document with only part of the data -- a bunch of data is missing.
    I have some loops in the XSLT that print out rows in an HTML table with the data I want to see. These loops don't seem to run when I'm in web start, but the rest of the transformation does run.
    I've confirmed this is not working on both Mac OS and Windows, version 1.5.0_06 and 1.5.0_09. So I don't think it is a bug on any particular platform. I am totally stumped by this. The XSL transformation process is doing something different in web start than it does when run from the command line (either different jars are in play, or system properties are different, etc).
    Has anyone else experienced this?
    Thank You,
    Eric

    One thing I'd like to mention...
    My XML document has no namespace defined, and neither does my XSLT transform document. I am just referencing plain old string element names that simply match between the XML and XSLT. This all works fine when the Transform is run from a java app that is started on the command line. Things break down when the app is run via Java Web Start. Could the namespace issue be the problem, however? I don't see how that could be as the code works from a 'normal' java app, but maybe I'm missing something.

  • Transform box won't disappear?

    Greetings!
    Working in CS4 on the Mac. Hunting around earlier today for type functions, I stumbled across an option to display my transform handles (aka bounding box) when on a layer inside the image. Put another way, I have my handles even though I haven't hit Command-T.
    How do I turn this overlay back off? It gets awful distracting!
    Thanks sincerely.
    Sorry to pose such a no-brainer!!

    There's a checkbox in your options bar called "show transform controls". Options bar for Move Tool.
    Sometimes its just so obvious that its almost distracting. I have a theory that people assume photoshop is a lot more complex than it actually is - and as a result can't see something when its staring them in the face.

  • AIR 3.7 app won't install on Transformer Infinity, gives "device storage full" error

    I just upgraded to AIR 3.7 and have found my AIR for Android app, published from the Flash CS6 IDE, will no longer install on my Asus Transformer Infinity. Both Flash and the Asus Sync software report an installation error and that the device storage is full. If I transfer the APK onto my tablet from Windows and then try to install the APK directly on the Transformer it tries to install and then reports the installation failed. This issue occurs from multiple computers. Reverting to AIR 3.5 causes the app to work again. My storage is not full; I have 10 gigabytes free. USB debugging and installation of non-market apps are enabled.
    Does anyone know what might be the cause? The same app compiled with AIR 3.7 does work on the Samsung Galaxy Tab 2 7.0.

    no, i try to install air app on desktop that was build month ago, and was succefully installed previously
    but now, said that there is a problem, and i need to send request to this app developer (me)
    problem was with certification, it was expired, generate new one, compile app, and it installed
    sry for bad english

  • Illustrator CC won't scale with "transform again"

    Coming from CS6, this is a feature I used all the time. However when I scale an object in CC and use transform again (Ctrl + D) to repeat the transformation on another object, it ignores the scaling and just repeats the most recent translation ie. it just moves the object rather than resizing it.
    I don't even know where to start to fix this, any ideas?

    pigeonbreath,
    Unless it has changed (you may have a look at the Object>Transform first option), it may be time for the list.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save curent artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Actions won't play back transformations properly

    The transformations 'skew', 'distort', and 'perspective' wont' play back properly in PS CC2014. You can record an action, but it will play back differently. Not just a few pixels different, but a lot. I also tested a number of existing actions that I used in PS CS3, but they play back wrong too, even though they worked fine previously.
    How is this possible? Is it a bug? Anyone knows something about this issue?

    When you record action that deal with sizes.  You need the think about what your recording.  The thing is there is a lot going on.  You need to record the action to work the way you want them to. You need to take into consideration that you may not many things about the document the action is being used on.  Unless you know somthing like the action will only be use on un-cropped landscape images from a particular.  In that case you know every document is x pixel wide and y pixel high.
    More often you have no idea of what size a document is you do not know the  number of pixel wide, high or the resolution the document is.    Size can be tricky to deal with.  You can record things in absolute pixel sizes, relative to resolution and relative to document size.  How Photoshop units is set determines how many steps are recorded.  Steps like transform are prime examples. Is your transform recorded Absolute pixel sized a location, Relative to resolution or relative to Document size.
    Crafting Actions Package  UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.
    Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    More then a dozen Scripts for use in actions
    Example
    Download

Maybe you are looking for

  • PowerPoint Makes File Read-only After Saving

    Hello all, A couple of end users have encountered the above problem. They make changes to pptx files and after the file saves, the file becomes read only (says so on the program window). If they are not paying attention, then any other changes they m

  • Error message in Lightroom 3

    I just purchased and installed Lightroom 3 (my first Lightroom purchase). It installed properly, and converted my catalog from Elements 7.0. However, every time I click on a photo or a keyword I get an error message saying that Lightroom has experien

  • Max Quantity of Records in ODS

    Hi Gurus, Today i went to a Client to check the BW Implementation, and i found out some "strange things", one of then is that exist ODS with 25 millon of records and increase 1 millone per week. My question is : Which is the max quantity of record th

  • Is it possible to open a pro tools project in logic?

    Or vise versa?, What can or cannot be done to communticate between these two apps? In olden days, Apple bent over backwards to be compatible with windows apps. Have they done this with logic or are we on our own as far as working with the pro tools b

  • Service Contracts Coverage Templates.

    Hi , In coverage template block(Coverage block of form oksaucvt) from which table coverage name,coverage description and transfer fileds are coming up. Please reply. Thanks!...