Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: MikeAJ
  • Order by date
  1. MikeAJ

    Transform XSL into XSL

    Hi, I have a fairly large and complex XSL (around 1000 lines) that is used to convert XML into XHTML and display inside a webpage. I have a new situation where I need to add a header and footer to this stylesheet before I transform the XML with it. So, what I'm trying to do is write a...
  2. MikeAJ

    Select XML attribute into pl/sql collection

    I figured out what I can do. If I select the xml into an xmlType, I can run the following query to bulk collect SELECT EXTRACT(VALUE(xml), '//PART/@part_number').getStringVal() BULK COLLECT INTO v_part_list FROM TABLE(XMLSEQUENCE((v_test.EXTRACT('//PART')))) xml; Thanks...
  3. MikeAJ

    Select XML attribute into pl/sql collection

    The problem is that the select statement returns ALL of the part number smashed together in one long string. So that statement returns 1 record and 1 column with something like "331077-05331030-05331552-05", and what I'm wanting to do is bulk collect all of part attributes into a collection...
  4. MikeAJ

    Select XML attribute into pl/sql collection

    Hi, I have a very simple xml structure that could have up 100 parts: <PARTS> <PART part_number="331077-05"/> <PART part_number="331030-05"/> <PART part_number="331552-05"/> </PARTS> I also have a pl/sql collection like this: TYPE myParts IS TABLE OF VARCHAR2(10); Is it possible to BULK...
  5. MikeAJ

    Validate XML

    I tried using the built in DOM Parsers, but I'm seeing some weird behavior. <script type="text/javascript"> function validateXML() { var xmlString = document.getElementById("src_p_xml").value; alert(xmlString); try { if (document.implementation.createDocument) { var parser = new...
  6. MikeAJ

    Validate XML

    Hi, I have a form and a textarea in which a user can input some XML to update a table. The column type in the database is XMLTYPE, so it must be a valid xml string going in or else an error is thrown. What's the best way to test that a string is valid XML? Thanks, Mike
  7. MikeAJ

    Format-Number

    Thanks tsuji and Tom! tsuji, your template works great. Thanks again for the help! Mike
  8. MikeAJ

    Format-Number

    I did, and with cooktop it doesn't meet the second use case. I also tried to use translate to drop it off, but that wasn't working. translate(format-number(num, '###,###.00'), '.00', '') Thanks, Mike
  9. MikeAJ

    Format-Number

    I need to format currency such that: 1234.56 = 1,234.56 12345.6 = 12,345.60 123456 = 123,456 I'm using format-number(@price, '###,###.00'), but it leaves on .00. Is there a pattern to drop the decimal when it's .00? Thanks!
  10. MikeAJ

    Repeating template for each sibling

    Thank you both for your comments and feedback. I'm still in the discovery phase with XSL. So I appreciate your help and insight. Thanks, Mike
  11. MikeAJ

    Repeating template for each sibling

    Thanks for the response guys! I appreciate it! tsuji, your example plugged right in and almost worked perfectly. It's successfully looping for each sibling, but it doesn't print out a line for the first one. I copied the code in the part line template to the part form. So it's working correctly...
  12. MikeAJ

    Repeating template for each sibling

    Hello, I'm trying to use XSL to the fullest by using templates instead of repeating my code. I have "PART" nodes that can be in the root document itself, or can be embedded in one or many levels deep in an "OPTION_CLASS" tag. Anytime I find at least one child PART node, I need to create a table...
  13. MikeAJ

    Loop through XML Nodes

    So what are these various SQL/XMLDB type operators you speak of? That's really what I'm looking for. Thanks, Mike
  14. MikeAJ

    Flatten XML hierarchy

    Thanks guys! Tsuji, your example worked! Very cool stuff! I learned a lot from it! Thanks again, Mike
  15. MikeAJ

    Flatten XML hierarchy

    Hi XSL Gurus, I need to flatten an XML hierarchy that can go many levels deep, to an XML doc that's only 1 level deep. In the flattened form, though, it must be able to reference what it's parent node used to be. Here's an example: <PACKAGE id = "1"> <OPTION_CLASS id = "2">...
  16. MikeAJ

    Loop through XML Nodes

    I have an xml document that I need to read and insert records from. The nodes can be buried as many levels deep as they need to be, and it's giving me some problems. Here's my xml doc: <PACKAGE segment1 = "CFP" inventory_item_id = "213301"> <OPTION_CLASS segment1 = "CFP PAC"...
  17. MikeAJ

    Unpack a column in a view

    Dave, you nailed it!! Thank you so much for your help!!! Mike
  18. MikeAJ

    Unpack a column in a view

    Thank you for the replies! This is a legacy system, and a redesign is not in scope right now. So I have to make due with the bad design. Dave, The most elements I found in the column was 20. Thanks, Mike
  19. MikeAJ

    Unpack a column in a view

    I need to write a view that joins part numbers in one table to a wom_id in another. The problem is the part numbers are crammed into a single column and delimited by "|". Is it possible to write a view on top of this join, that will normalize the result? Here is my query: Select w.wom_id...
  20. MikeAJ

    CDATA bug in XMLType

    I got it. I had to use this in my xsl: <script type="text/javascript"> <xsl:comment> <![CDATA[ function getOLs() { if(typeof window.onload=='function'){ if(typeof ol_ol=='undefined')ol_ol=new Array(); ol_ol.push(window.onload); } } ]]> </xsl:comment> </script>

Part and Inventory Search

Back
Top