xsl-list
[Top] [All Lists]

RE: How to get a list of XPath out of XML schema documents

2005-02-24 01:46:14
Firstly, there's an infinite number of XPath expressions that select nodes
in any given document. Your example suggests you're only interested in a
subset of such paths: those that select elements, that are absolute path
expressions, that use the child axis only, that use NameTests, and that
contain no predicates.

Secondly, there's a problem with generating path expressions: namespaces. An
element in a non-null namespace can only be referenced in a path expression
by means of a QName that contains a prefix, and there is no way within the
path expression itself of binding the prefix to a specific URI. If the list
of path expressions is intended only for visual inspection this might not
matter, but if it's intended for use by software, then generating
expressions of the form

/*[local-name()="abc" and namespace-uri="http://my.example.com/ns"]/*[.....]

would be better.

Finally, the title of your post says you want to generate paths from a
schema, whereas the body of your post suggests you want to generate paths
from an instance document. I think you need to define your requirements
rather more clearly.

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: "Michael Lindenau (geschäftlich)" 
[mailto:michael(_dot_)lindenau(_at_)loesungen-und-ideen(_dot_)de] 
Sent: 24 February 2005 02:41
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] How to get a list of XPath out of XML schema documents

Hi,
I'm a newbie and I would like to figure out, how I can get a 
list of all
XPath in an XML document via XLST.
The list can have XML, HTML or CSV format. I'm only interested in all
complete XPath expressions.

Something like

/doc/main/field
/doc/main/field/id
...

Are examples somewhere available. I searched through Google all night
long with little success.

Thanx in advance for any help

-- 

Kind regards

Michael Lindenau
Lösungen+Ideen

"Any problem in computer science can be solved with
another layer of indirection. But that usually will
create another problem!" <David Wheeler>

mobile: +49 (0) 179 29 28 834
e-mail: michael(_dot_)lindenau(_at_)loesungen-und-ideen(_dot_)de

-------------------------------------------------------
Lösungen+Ideen

Alejandro Puskin No 1, Portal H, 5C
29011 Málaga
ES - España
-------------------------------------------------------

This email is confidential. If you are not the intended
recipient, you must not disclose or use the information
contained in it. If you have received this mail in error,
please tell me immediately by return email and delete
the document.



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>