Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Search Forums
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Showing results 1 to 25 of 147
Search took 0.01 seconds.
Search: Posts Made By: armmarti
Forum: XML December 30th, 2003, 02:00 AM
Replies: 17
Views: 37,015
Posted By armmarti
Sorry Ayat, but saving XML document as string and...

Sorry Ayat, but saving XML document as string and making replacements is against the paradigm of XML... An XML document can't be viewed as a sequence of '<', '>', '/' and other "ordinary" characters....
Forum: XSLT December 29th, 2003, 08:09 AM
Replies: 1
Views: 1,052
Posted By armmarti
Yes of course. You can use JAXP: import...

Yes of course. You can use JAXP:


import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import java.io.File;

public class...
Forum: XML December 29th, 2003, 02:13 AM
Replies: 17
Views: 37,015
Posted By armmarti
Hi Ayat, Really I think that XSLT solution...

Hi Ayat,

Really I think that XSLT solution is convenient (from my point of view). It may be slow since the algorithm is designed to walk through the whole document and also it's recursive. I just...
Forum: XML December 25th, 2003, 09:33 AM
Replies: 17
Views: 37,015
Posted By armmarti
If you want to search the whole XML document,...

If you want to search the whole XML document, this code is quite small :). If you know where your text can be found exactly (that is, the parent node of the text node containing the text you want to...
Forum: XML December 25th, 2003, 02:14 AM
Replies: 17
Views: 37,015
Posted By armmarti
You can achieve this by processing the DOM...

You can achieve this by processing the DOM tree(by parsing the document using TrAX and then manipulate the DOM tree using Java, for example). Another approach is a stylesheet:


<?xml...
Forum: XSLT December 24th, 2003, 12:24 PM
Replies: 16
Views: 4,491
Posted By armmarti
There are actually 3 places where the background...

There are actually 3 places where the background is grey:
1. In the header. You don't need to change anything for this case.
2. In non-empty cells which are the first:

...
<xsl:template...
Forum: XSLT December 24th, 2003, 11:52 AM
Replies: 1
Views: 843
Posted By armmarti
I suppose that this stylesheet is applied to the...

I suppose that this stylesheet is applied to the XML snippet you posted(as a separate XML document).
I suppose also that all namespace prefixes are properly bound to their namespace URIs:


<?xml...
Forum: XML December 24th, 2003, 08:08 AM
Replies: 3
Views: 8,477
Posted By armmarti
Try this (not tested): import...

Try this (not tested):


import java.applet.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;


public class ReadXML...
Forum: XML December 24th, 2003, 04:30 AM
Replies: 17
Views: 37,015
Posted By armmarti
You can do it with XSLT. Post your XML document...

You can do it with XSLT. Post your XML document and describe what you want to replace by what. There are couple of methods, but each is good in concrete situation, so we have to see your XML.
...
Forum: XSLT December 24th, 2003, 01:48 AM
Replies: 16
Views: 4,491
Posted By armmarti
Happy to help, Tad. Unfortunately I had not...

Happy to help, Tad. Unfortunately I had not enough time to describe these "adaptation" steps in more details, however it's great that you've done.
XSLT is strong enough: it's, after all, a...
Forum: XSLT December 22nd, 2003, 01:49 AM
Replies: 16
Views: 4,491
Posted By armmarti
You don't need to include any stylesheet. Your...

You don't need to include any stylesheet. Your processor probably supports something like node-set() function, which is defined in EXSLT(and hence, you need just to declare the namespace like you...
Forum: XSLT December 20th, 2003, 07:01 AM
Replies: 16
Views: 4,491
Posted By armmarti
I think the simplest solution is to perform two...

I think the simplest solution is to perform two passes(and this approach requires minimum changes to the original code, leaving the logic untouched):

a) Get the subtree, which will represent the...
Forum: XSLT December 19th, 2003, 02:47 PM
Replies: 16
Views: 4,491
Posted By armmarti
Again all ampersands disappeared for character...

Again all ampersands disappeared for character references...
Add the ampersand symbol before '#xA0;'
Forum: XSLT December 19th, 2003, 02:43 PM
Replies: 16
Views: 4,491
Posted By armmarti
I've tried to deal with this as much generally as...

I've tried to deal with this as much generally as I could [ prior to my free time ;) ].

The stylesheet is general enough.

Any xml document can be rendered as soon as it has this structure...
Forum: XSLT December 19th, 2003, 04:48 AM
Replies: 16
Views: 4,491
Posted By armmarti
Hi, Let's clarify what you want: the output...

Hi,

Let's clarify what you want: the output you want has more than 3 columns... I guess you mistyped and really you want 2 columns (title and price). Please clarify the point to be able to help...
Forum: XML December 16th, 2003, 07:13 AM
Replies: 2
Views: 7,332
Posted By armmarti
Again... The ampersand disappeared... Please put...

Again... The ampersand disappeared... Please put an ampersand symbol before '#'
Forum: XML December 16th, 2003, 07:10 AM
Replies: 2
Views: 7,332
Posted By armmarti
Hi, "#x0A;" Regards, Armen

Hi,

"#x0A;"

Regards,
Armen
Forum: XSLT December 11th, 2003, 06:20 AM
Replies: 2
Views: 2,787
Posted By armmarti
Here is the stylesheet: <?xml...

Here is the stylesheet:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:variable name="allowed"...
Forum: XSLT December 10th, 2003, 01:11 PM
Replies: 6
Views: 15,864
Posted By armmarti
Sorry for the late response: I was busy... ...

Sorry for the late response: I was busy...

So, Xalan (2.5.2, for example) gives you an opportunity to write your own extensions.
Read first this: http://xml.apache.org/xalan-j/extensions.html....
Forum: XSLT December 9th, 2003, 01:46 AM
Replies: 6
Views: 15,864
Posted By armmarti
What you can pass to XSLT stylesheet are so...

What you can pass to XSLT stylesheet are so called stylesheet parameters. For example, in the command line you can write:

saxon source.xml sheet.xsl param1=value1 param2=value2 ...

However,...
Forum: XSLT December 6th, 2003, 12:19 PM
Replies: 1
Views: 811
Posted By armmarti
Try this (not tested): <?xml...

Try this (not tested):


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common">
<xsl:template match="/">...
Forum: XSLT December 5th, 2003, 12:30 PM
Replies: 4
Views: 2,701
Posted By armmarti
I'm applying this stylesheet: <?xml...

I'm applying this stylesheet:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:text="aaa">
<xsl:template...
Forum: XSLT December 5th, 2003, 11:38 AM
Replies: 4
Views: 2,701
Posted By armmarti
The function normalize-space() removes starting...

The function normalize-space() removes starting and trailing whitespace and replaces all other whitespace characters by single whitespace. And also the function takes as an argument a string(if not...
Forum: XSLT December 4th, 2003, 02:11 AM
Replies: 5
Views: 1,608
Posted By armmarti
You've found the simplest solution :) Yes of...

You've found the simplest solution :)
Yes of course, we are free to use any function in predicate expressions (restriction is only on the pattern location paths).
By the way, you also can use...
Forum: XSLT December 3rd, 2003, 11:04 AM
Replies: 5
Views: 1,608
Posted By armmarti
Ok, your XML doc is flat indeed, so it's hard to...

Ok, your XML doc is flat indeed, so it's hard to find structural commonalities. Let's make a trick!




...

<xsl:apply-templates select="/office:body/text:p" mode="headings"/>

...
Showing results 1 to 25 of 147

 


All times are GMT -4. The time now is 07:55 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.