以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  xsd, xpath  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=26761)


--  作者:derek
--  发布时间:1/24/2006 8:33:00 PM

--  xsd, xpath
Hi ,

I am facing a problem, I want to get the Xpath for all the element specified in XSD(NOT the XML), I try writing my own xslt to extract the informatin but it seems not working, the way the saxon parses the .xml is different to .xsd(or because schema, element etc are keyword?)

can someone have any idea by giving the XSD how to generate the xpath for all the elements that specified in the XSD?


--  作者:98900969r
--  发布时间:1/25/2006 6:43:00 PM

--  
that can of course be done. the logic involved should not be very complicated. Basically, for global objects ( I mean global/top-level element or attribute), absolute paths can not be derived, because they can be referenced anywhere and thus don't have a fixed path. For local objects, relative paths with respect to their respective containing objects can be derived.

XMLSpy provides such funcationality. maybe, you can get some hints by playing with it.


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
8,597.656ms