Tool to create XSLT templates

F

Francesc001

I will try to explain a little which is the functionality that we are
looking for.

We need a tool to create XSL templates able to transform plane text to
XML.

As source we have strings where fields are concatenated one after
another. Fields are of different length.
We need to map these fields into defined schemas. This task implies to
split source data indicating position and length for each field.

I have downloaded the trial version of Altova Mapforce 2008 but
unfortunately the tool they have for split text files (called
FlexText) can not be used if generating XSLT, only is available to
generate JAVA, C# source code.

Do you know any software able to create this kind if XSL templates?

Thank you.

Francesc
 
M

Martin Honnen

Francesc001 said:
I will try to explain a little which is the functionality that we are
looking for.

We need a tool to create XSL templates able to transform plane text to
XML.

But XSLT transforms a tree, usually created by parsing XML, to XML or
HTML or plain text. I don't see how you would apply templates to plain
text. You would need to write a parser first for your plain text format
to emit XML but then you would not need XSLT any longer.
 
F

Francesc001

But XSLT transforms a tree, usually created by parsing XML, to XML or
HTML or plain text. I don't see how you would apply templates to plain
text. You would need to write a parser first for your plain text format
to emit XML but then you would not need XSLT any longer.

I will create an XML document with a simple tree, like this....

<MyXMLDoc>
<Parameter>1234</Parameter>
<Data>Here it is string to process</Data>
</MyXMLDoc>

I need a XSLT who take <Data> and split its fields to a new XML file.
I look for a tool for creating this XSLT.

Francesc
 
P

Pavel Lepin

Francesc001 said:
I will create an XML document with a simple tree, like
this....

<MyXMLDoc>
<Parameter>1234</Parameter>
<Data>Here it is string to process</Data>
</MyXMLDoc>

I need a XSLT who take <Data> and split its fields to a
new XML file. I look for a tool for creating this XSLT.

The tool you're looking for is commonly called "brain" and
humans are typically supplied with one at birth. If you
have lost or misplaced yours, contact your vendor's
customer support centre for a replacement.

On a more serious note, XSLT is not designed for string
processing. This might be bearable with XSLT2, but still a
curious design choice.
 
J

Joseph Kesselman

Pavel said:
On a more serious note, XSLT is not designed for string
processing.

Slight disagreement: XSLT is not *optimized* for string processing. XSLT
and XPath do have string manipulation functions, and you can combine
those with XSLT recursion to achieve most desired results... but it may
be a bit painful. The XSLT FAQ website; it has a large number of
examples of how to do this.

But if you're looking for a tool to assist you in writing the stylesheet
to perform those string extractions... well, as Pavel suggested the most
common tool is a human who knows XSLT. There have been attempts to
create query-by-example tools that assist users in producing XSLT
transformations, but they're relatively uncommon and those which do
exist have generally focused on more the input document's structure than
on trying to break up the contents of individual fields.
 
P

Pavel Lepin

Joseph Kesselman said:
Slight disagreement: XSLT is not *optimized* for string
processing. XSLT and XPath do have string manipulation
functions, and you can combine those with XSLT recursion
to achieve most desired results...

Nitpick acknowledged, "optimised" is a better word under the
circumstances: XSLT1 was designed with limited
string-processing capabilities, but not intended to do
serious string processing, and not optimised for that task.
but it may be a bit painful.

Slight disagreement: in XSLT1 it's often *quite* painful.
<smile pained="yes"/>
 
F

Francesc001

OK. I think I will try the tool Pavel Lepin said. So, I am looking for
a brain able to......

Thanks!

Francesc
 
D

dnovatchev

On a more serious note, XSLT is not designed for string
processing. This might be bearable with XSLT2, but still a
curious design choice.


Not quite true. XSLT 2 and XPath F & O provide powerful text-
processing functions, including RegEx processing.

I have had some nice experience implementing a generalized LR(1)
parser in XSLT, a JSON to XML convertor (the f:json-document()
function of FXSL), an XPath 2.0 parser, a spell checker, a concordance
tool, a text justification tool -- all with reasonable efficiency (for
example the spellchecker processes several thousand words per second).


Cheers,
Dimitre Novatchev
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top